You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/08/24 17:26:15 UTC

[GitHub] [accumulo] keith-turner opened a new issue, #3721: Writes made by batch writer may happen after its closed or flushed.

keith-turner opened a new issue, #3721:
URL: https://github.com/apache/accumulo/issues/3721

   **Describe the bug**
   The batch writer uses [this code](https://github.com/apache/accumulo/blob/cd7642988bac831292e988326aaa96e07938c641/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchWriter.java#L948-L990) to actually write data via RPC.  The code handles single mutation writes differently than multiple mutations.  For single mutations it does a single RPC.  For multiple mutations it does 3 or more RPCs like the following.
   
    1. contact the tserver to create a session
    2. make one more calls to the tserver to write mutations using the session id
    3. contact the tserver get that status of the writes to the session and close the session
   
   In either case if there is a network timeout, the batch writer will retry making the RPCs.  However its not know what the status of the previous RPCs is, they could still be processing on the tserver and go through after the batch writer is closed or flushed.
   
   **Expected behavior**
   Writes do not go through after a batch writer is closed or flushed.  To accomplish this the single RPC write would probably have to be abandoned.  The multistep RPC could be modified to do something like the following in order to prevent write from happening after the batch writer is closed.
   
    1. contact the tserver to create a session
    2. make one more calls to the tserver to write mutations using the session id
    3. contact the tserver get that status of the writes to the session and close the session.  In the case of network failure, retry closing the session until the tserver no longer holds it lock in zookeeper.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ctubbsii commented on issue #3721: Writes made by batch writer may happen after its closed or flushed.

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on issue #3721:
URL: https://github.com/apache/accumulo/issues/3721#issuecomment-1692359234

   Would it be possible to track the state of the previous RPCs in a list of Futures and only send the session close RPC once the others are all completed?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] asfgit closed issue #3721: Writes made by batch writer may happen after its closed or flushed.

Posted by "asfgit (via GitHub)" <gi...@apache.org>.
asfgit closed issue #3721: Writes made by batch writer may happen after its closed or flushed.
URL: https://github.com/apache/accumulo/issues/3721


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org