eolivelli commented on a change in pull request #2096: Entries must be
acknowledged by bookies in multiple fault domains before being acknowledged to
client
URL: https://github.com/apache/bookkeeper/pull/2096#discussion_r284551830
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java
##########
@@ -363,10 +380,30 @@ public void writeComplete(int rc, long ledgerId, long
entryId, BookieSocketAddre
}
if (ackQuorum && !completed) {
- completed = true;
- this.qwcLatency = MathUtils.elapsedNanos(requestTimeNanos);
+ if (clientCtx.getConf().enforceMinNumFaultDomainsForWrite
+ &&
!(clientCtx.getPlacementPolicy().areAckedBookiesAdheringToPlacementPolicy(addEntrySuccessBookies)))
{
+ LOG.warn("Write success for entry ID {} delayed, not
acknowledged by bookies in enough fault domains",
+ entryId);
+ // Increment to indicate write did not complete due to not
enough fault domains
+
clientCtx.getClientStats().getWriteDelayedDueToNotEnoughFaultDomains().inc();
+
+ // Only do this for the first time.
+ if (writeDelayedStartTime == -1) {
+ writeDelayedStartTime = MathUtils.nowInNano();
+ }
+ } else {
+ completed = true;
Review comment:
So in summary you are discarding the acks that are not coming from the
desired racks.
Do I understand correctly?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services