Skip to content

Commit

Permalink
Document behavior change for zero speculative execution delay
Browse files Browse the repository at this point in the history
JAVA-1490 breaks legacy policy implementations if they returned 0 to
mean "no execution" (the workaround is to return a negative value
instead).
  • Loading branch information
olim7t committed Oct 1, 2018
1 parent 3ad44d7 commit 25244e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ interface SpeculativeExecutionPlan {
*
* @param lastQueried the host that was just queried.
* @return the time (in milliseconds) before a speculative query is sent to the next host. If
* negative, no speculative query will be sent. If zero it will immediately send the
* execution.
* negative, no speculative query will be sent. If zero, it will immediately send the
* execution. <em>Note that, prior to version 3.3.1, zero meant "no speculative query", so
* custom policies written at that time may now start to schedule more executions than
* expected; make sure you use a negative value, not zero, to stop executions.</em>
*/
long nextExecution(Host lastQueried);
}
Expand Down
9 changes: 9 additions & 0 deletions upgrade_guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ you were accessing these methods using reflection in which case you need to
account for these new parameter types.


### 3.3.1

Speculative executions can now be scheduled without delay: if
`SpeculativeExecutionPlan.nextExecution()` returns 0, the next execution will be fired immediately.
This allows aggressive policies that hit multiple replicas right away, in order to get the fastest
response possible. Note that this may break existing policies that used 0 to mean "no execution";
make sure you use a negative value instead.


### 3.2.0

The `SSLOptions` interface is now deprecated in favor of
Expand Down

0 comments on commit 25244e8

Please sign in to comment.