You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve configuration around readAfterReplicaAcknowledged() which can be used with replication to allow a configurable number of inflight messages.
The charts above shows the difference allowing inflight messages makes.
API CHANGE
we added the following
/**
* Allows you to control the number of in flight messages that are allowed when setting {@code acknowledgedIndexReplicatedCheck}, By default, this is set to:
* <p>
* <p>
* By providing a custom implementation of {@code acknowledgedIndexReplicatedCheck} you can control the number of in-flight messages that are allowed before the message is available to be read by the tailer.
* And in addition, then acknowledgedIndexReplicatedCheck will be set to true.
* <p>
* below is the default implementation:
* <pre>
* boolean acknowledgedIndexReplicatedCheck(long index, long lastSequenceAck) {
* return index == lastSequenceAck;
* }
* </pre>
* <p>
* With this default implementation it will ensure tailer will not be able to read a message until it has been acknowledged that it has been full replicated.
* <p>
* However, if you wish to tolerate a number of in-flight or pending messages before the message.,
* You can set this to a different implementation. For example, if you wish to tolerate one unacknowledged message, set {@code tolerateNumberOfUnAckedMessages} to 1, as shown below:
* <pre>
* boolean acknowledgedIndexReplicatedCheck(long index, long lastSequenceAck) {
* int tolerateNumberOfUnAckedMessages = 1;
* return index <= lastSequenceAck + tolerateNumberOfUnAckedMessages;
* }
* </pre>
*
* @param acknowledgedIndexReplicatedCheck as a custom implementation of {@code acknowledgedIndexReplicatedCheck}
*/
default void acknowledgedIndexReplicatedCheck(AcknowledgedIndexReplicatedCheck acknowledgedIndexReplicatedCheck) {
throw new UnsupportedOperationException("This method is not supported by this implementation");
}
)
* #1564 Improve configuration around readAfterReplicaAcknowledged() to allow a configurable number of in-flight messages.
* removed unwanted test
* reverted back to private
* added another test
* moved the tests
* added javadoc
* added @NotNull to acknowledgedIndexReplicatedCheck
---------
Co-authored-by: Rob Austin <rob.austin@boundedbuffer.co.uk>
Relates to #1566 and https://github.com/ChronicleEnterprise/Chronicle-Queue-Enterprise/pull/704
Improve configuration around readAfterReplicaAcknowledged() which can be used with replication to allow a configurable number of inflight messages.
The charts above shows the difference allowing inflight messages makes.
API CHANGE
we added the following
For a benchmark of this please see at https://github.com/ChronicleEnterprise/Chronicle-Queue-Enterprise/pull/704/files#diff-c099f655dcf641932ba5a714623534c6d2165d5f6a49619cd9dce61fc2e6ad96
The text was updated successfully, but these errors were encountered: