adelapena commented on code in PR #2246:
URL: https://github.com/apache/cassandra/pull/2246#discussion_r1158524860


##########
src/java/org/apache/cassandra/db/guardrails/GuardrailsMBean.java:
##########
@@ -651,4 +651,56 @@
      * @param value {@code true} if 0 default TTL on TWCS tables is allowed, 
{@code false} otherwise.
      */
     void setZeroTTLOnTWCSEnabled(boolean value);
+
+    /**
+     * @param currentTimestamp the current timestamp
+     * @return The highest acceptable timestamp before triggering a warning
+     */
+    long getMaximumTimestampWarnThreshold(long currentTimestamp);
+
+    /**
+     * Sets the warning upper bound for user supplied timestamps
+     *
+     * @param durationSeconds currentTimestamp + 
TimeUnit.SECONDS.toMicros(duration)
+     */
+    void setMaximumTimestampWarnThreshold(int durationSeconds);
+
+    /**
+     * @param currentTimestamp the current timestamp
+     * @return The highest acceptable timestamp before triggering a failure
+     */
+    long getMaximumTimestampFailThreshold(long currentTimestamp);
+
+    /**
+     * Sets the failure upper bound for user supplied timestamps
+     *
+     * @param durationSeconds currentTimestamp + 
TimeUnit.SECONDS.toMicros(duration)

Review Comment:
   I think the setters accept the config duration alone, as defined in the 
yaml, without adding the current timestamp.



-- 
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