sijie commented on a change in pull request #817: Client times out requests in
batch rather than individually
URL: https://github.com/apache/bookkeeper/pull/817#discussion_r155137029
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java
##########
@@ -91,14 +88,11 @@ static PendingAddOp create(LedgerHandle lh, ByteBuf
payload, AddCallback cb, Obj
op.completed = false;
op.ackSet = lh.distributionSchedule.getAckSet();
op.addOpLogger = lh.bk.getAddOpLogger();
- if (op.timeout != null) {
- op.timeout.cancel();
- }
- op.timeout = null;
- op.timeoutSec = lh.bk.getConf().getAddEntryQuorumTimeout();
+ op.timeoutNanos =
TimeUnit.SECONDS.toNanos(lh.bk.getConf().getAddEntryQuorumTimeout());
Review comment:
may be worth calculating the value in bookkeeper instance. so we don't need
to calculate for every add op.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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