adelapena commented on code in PR #2246:
URL: https://github.com/apache/cassandra/pull/2246#discussion_r1158578855
##########
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);
Review Comment:
Perhaps we can try to homogenize the JMX methods and config so they only
deal with the config properties as they are expressed in yaml, and encapsulate
in `Guardrails.java` the part about making those thresholds relative to the
current time. More or less [this
way](https://github.com/adelapena/cassandra/commit/514be38817e7e21e3da9244fcac338c1b512fbee).
wdyt?
--
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]