pauloricardomg commented on code in PR #4737:
URL: https://github.com/apache/cassandra/pull/4737#discussion_r3081196244


##########
conf/cassandra.yaml:
##########
@@ -2721,6 +2721,12 @@ max_security_label_length: 48
 # except the ones specified on excluded_keyspaces and excluded_tables.
 #  check_data_resurrection:
 #    enabled: false
+# when there is the timestamp in heartbeat file plus

Review Comment:
   this reads a bit confusing, how about:
   ```
     #    # Minimum grace period for the check, defaults to 0. Useful when 
gc_grace_seconds is very
     #    # small (e.g. 0) to avoid blocking startup immediately.
     #    minimum_threshold: 3h
   ```
   
   also the top `check_data_resurrection` message is:
   ```
   # Enable this property to fail startup if the node is down for longer than 
gc_grace_seconds, to potentially
   # prevent data resurrection on tables with deletes. By default, this will 
run against all keyspaces and tables
   # except the ones specified on excluded_keyspaces and excluded_tables.
   #  check_data_resurrection:
   ```
   
   change that to
   ```
     # Enable this property to fail startup if the node is down for longer than 
max(gc_grace_seconds, minimum_threshold), to potentially prevent data 
resurrection on tables with deletes. By default,
     # this will run against all keyspaces and tables except the ones specified 
on excluded_keyspaces
     # and excluded_tables.
   ```



##########
src/java/org/apache/cassandra/service/DataResurrectionCheck.java:
##########
@@ -228,7 +264,7 @@ public void execute(StartupChecksConfiguration 
configuration) throws StartupExce
                     continue;
 
                 long gcGraceMillis = ((long) userTable.gcPeriod) * 1000;
-                if (heartbeatMillis + gcGraceMillis < currentTimeMillis)
+                if (heartbeatMillis + gcGraceMillis + minimumThreshold < 
currentTimeMillis)

Review Comment:
   Shouldn't this be `heartbeatMillis + max(gcGraceMillis, minimumThreshold))` 
? otherwise it will go past gc_grace_seconds when it's different from zero.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to