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 06:46:20 UTC

[bookkeeper] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


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

commit 03d38a7639c8013f16838cc795ac9bf7a03ecd99
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 62a28c4a4b..ad2777ef4d 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
@@ -683,7 +683,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()