smiklosovic commented on code in PR #2649:
URL: https://github.com/apache/cassandra/pull/2649#discussion_r1317722576


##########
src/java/org/apache/cassandra/db/guardrails/Guardrails.java:
##########
@@ -184,6 +184,15 @@ public final class Guardrails implements GuardrailsMBean
                     state -> 
CONFIG_PROVIDER.getOrCreate(state).getDropKeyspaceEnabled(),
                     "DROP KEYSPACE functionality");
 
+    /**
+     * Guardrail disabling bulk loading of SSTables
+     */
+    public static final EnableFlag bulkLoadEnabled =
+    new EnableFlag("bulk_load_enabled",
+                   null,

Review Comment:
   @Runtian you just wrote the message which should be present in an exception 
thrown when it is disabled :)
   
   `Bulk loading of SSTables was disabled by Cassandra operator. We activate 
this feature only for users who truly require it to not make nodes potentially 
unstable.`
   
   Something like that ... 
   
   Is not it true that guardrail's exception will be propagated to 
StreamSession#onError? You can probably append `t.getMessage()` via 
SessionFailedMessage
   
           if (channel.connected())
           {
               state(State.FAILED); // make sure subsequent error handling sees 
the session in a final state 
               channel.sendControlMessage(new 
SessionFailedMessage()).awaitUninterruptibly();
           }
   
   `new SessionFailedMessage(t)`
   
   and then append it in toString when it is not null.
   
   Is @adelapena cool with that?
   
   
   However, I am not sure how that would work with serialization / 
deserialization logic. It would probably not work ...
   
   But I think that description is still valuable to have. Maybe in future all 
these guardrails will be present somewhere for a user so he might see what each 
guardrail does and what it is good for.



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