You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by eo...@apache.org on 2022/08/21 07:01:06 UTC

[bookkeeper] branch branch-4.15 updated: WriteLacResponse should be processed in the same thread as other requ… (#3452)

This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch branch-4.15
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/branch-4.15 by this push:
     new 59c1214dcc WriteLacResponse should be processed in the same thread as other requ… (#3452)
59c1214dcc is described below

commit 59c1214dcc563ca34e760c10253b1d2862ca316e
Author: karanmehta93 <k....@salesforce.com>
AuthorDate: Sat Aug 20 23:46:14 2022 -0700

    WriteLacResponse should be processed in the same thread as other requ… (#3452)
    
    * WriteLacResponse should be processed in the same thread as other requests for same ledgerId
    
    In PCBC code, the WriteLacCompletion object uses LAC as the key for selecting the thread in which the response
    will be processed. However, according to bookkeeper code guarantees, the thread should be decided based on hash of ledgerId.
    
    * Empty-Commit
---
 .../main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
index 0be3996ac8..1b1092bd39 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
@@ -682,7 +682,7 @@ public class PerChannelBookieClient extends ChannelInboundHandlerAdapter {
         // writeLac is mostly like addEntry hence uses addEntryTimeout
         completionObjects.put(completionKey,
                               new WriteLacCompletion(completionKey, cb,
-                                                     ctx, lac));
+                                                     ctx, ledgerId));
 
         // Build the request
         BKPacketHeader.Builder headerBuilder = BKPacketHeader.newBuilder()