You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by jm...@apache.org on 2022/03/03 12:46:19 UTC

[accumulo] branch main updated: Fate op defer time is not used (#2539)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new edbae8e  Fate op defer time is not used (#2539)
edbae8e is described below

commit edbae8e32cf1008ab898490dc00e776a56df09ab
Author: Mark Owens <jm...@apache.org>
AuthorDate: Thu Mar 3 07:46:07 2022 -0500

    Fate op defer time is not used (#2539)
    
    A comment was added to Fate.java to indicate how the deferTime variable
    is being used. It clarifies that the value is used in the manner of an
    exit code for the particular if/else loop after the comment.
    
    But it also makes clear that the value of deferTime is used as a wait
    value later on within the ZooStore class.
    
    No code was modified with this ticket.
    
    Co-authored-by: Christopher Tubbs <ct...@apache.org>
---
 core/src/main/java/org/apache/accumulo/fate/Fate.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/src/main/java/org/apache/accumulo/fate/Fate.java b/core/src/main/java/org/apache/accumulo/fate/Fate.java
index eeebb04..0ca8a0a 100644
--- a/core/src/main/java/org/apache/accumulo/fate/Fate.java
+++ b/core/src/main/java/org/apache/accumulo/fate/Fate.java
@@ -81,6 +81,9 @@ public class Fate<T> {
             try {
               deferTime = op.isReady(tid, environment);
 
+              // Here, deferTime is only used to determine success (zero) or failure (non-zero),
+              // proceeding on success and returning to the while loop on failure.
+              // The value of deferTime is only used as a wait time in ZooStore.unreserve
               if (deferTime == 0) {
                 prevOp = op;
                 if (status == TStatus.SUBMITTED) {