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

dlmarion pushed a commit to branch 1.10
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/1.10 by this push:
     new cd81bc7922 Add comments found in ThriftClientHandler as to why client 
will wait for writes (#3181)
cd81bc7922 is described below

commit cd81bc79222b821924f8a3f8adee4aaba1091c4f
Author: Dave Marion <dlmar...@apache.org>
AuthorDate: Thu Feb 2 07:51:12 2023 -0500

    Add comments found in ThriftClientHandler as to why client will wait for 
writes (#3181)
    
    Closes #3174
---
 .../org/apache/accumulo/core/client/impl/ThriftScanner.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java 
b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
index 7c3b11fff0..8f1b11d664 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
@@ -75,6 +75,17 @@ import org.slf4j.LoggerFactory;
 public class ThriftScanner {
   private static final Logger log = 
LoggerFactory.getLogger(ThriftScanner.class);
 
+  // This set is initially empty when the client starts. The first time this
+  // client contacts a server it will wait for any writes that are in progress.
+  // This is to account for the case where a client may have sent writes
+  // to accumulo and dies while waiting for a confirmation from
+  // accumulo. The client process restarts and tries to read
+  // data from accumulo making the assumption that it will get
+  // any writes previously made, however if the server side thread
+  // processing the write from the dead client is still in progress,
+  // the restarted client may not see the write unless we wait here.
+  // this behavior is very important when the client is reading the
+  // metadata
   public static final Map<TabletType,Set<String>> serversWaitedForWrites =
       new EnumMap<>(TabletType.class);
 

Reply via email to