You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by ni...@apache.org on 2022/09/20 08:12:42 UTC

[bookkeeper] 19/25: WriteLacResponse should be processed in the same thread as other requ… (#3452)

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

nicoloboschi pushed a commit to branch ds-4.14
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git

commit 1fed2de6436b6fa0c8bd5bcae8b0705655a2e5ac
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 aeef8f8e19..29ccb7e6f2 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
@@ -673,7 +673,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()