josh-mckenzie commented on code in PR #1972:
URL: https://github.com/apache/cassandra/pull/1972#discussion_r1019504964
##########
src/java/org/apache/cassandra/db/guardrails/Guardrail.java:
##########
@@ -138,8 +143,19 @@ protected void fail(String message, String
redactedMessage, @Nullable ClientStat
@VisibleForTesting
String decorateMessage(String message)
{
- // Add a prefix to error message so user knows what threw the warning
or cause the failure
- return String.format("Guardrail %s violated: %s", name, message);
+ // Add a prefix to error message so user knows what threw the warning
or cause the failure.
+ String decoratedMessage = String.format("Guardrail %s violated: %s",
name, message);
+
+ // Add the reason for the guardrail triggering, if there is any.
+ if (reason != null)
+ {
+ if (message.endsWith("."))
Review Comment:
ultra-nit can do on commit if you want: ternary may make this a touch
cleaner.
--
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]