tiagomlalves commented on code in PR #3564:
URL: https://github.com/apache/cassandra/pull/3564#discussion_r1776697210


##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -2925,12 +2925,12 @@ public static void setListenOnBroadcastAddress(boolean 
listen_on_broadcast_addre
 
     public static IInternodeAuthenticator getInternodeAuthenticator()
     {
+        Preconditions.checkNotNull(internodeAuthenticator);
         return internodeAuthenticator;
     }
 
     public static void setInternodeAuthenticator(IInternodeAuthenticator 
internodeAuthenticator)
     {
-        Preconditions.checkNotNull(internodeAuthenticator);

Review Comment:
   @smiklosovic I'm considering reverting this change.
   
   This change was motivated by my attempt to move the assignment of the 
default `IInternodeAuthenticator` from `DatabaseDescriptor` directly to 
`AuthConfig.applyAuth()` (aligned with the remaining authentication). 
   However, this change created a cascade of other changes, namely:
    * the removal of the precondition check here because this method is called 
in `AuthConfig.applyAuth()` to set it for the first time (I move the 
precondition to the getter to ensure we would never return a null 
IInternodeAuthorizer).
    * fix of `ReconnectableSnitchHelperTest` which attempted to fetch 
`IInternodeAuthenticator` before `daemonInitialization()` was called
    * change of `clientIntialization()` to call `AuthConfig.applyAuth()` to as 
`IInternodeAuthenticator` is fetched from `OutboundConnection`.
   
   The last change, further creates other issues (see [run 
#33](http://35.228.140.106:8080/job/cassandra/33/#showFailuresLink) ), breaking 
`DatabaseDescriptorRefTest` that validates the classes that are lazily 
initialized when calling `clientInitialization`. There are now 25 more classes 
that are lazily initialized by adding `AuthConfig.applyAuth()` to 
`clientInitialization()`. I'll push a further commit with those changes to 
check how fart the CI goes.
   
   I have doubts this is really justified and I'm more inclined in simply 
reverting those changes. 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]

Reply via email to