There is inconsistent usage of toLowerCase/toUpperCase methods in the codebase.
Somewhere we already use Locale.US, somewhere not. That might cause various issues in runtime
as shown in CASSANDRA-19953 ticket when an environment Cassandra runs in has different locale from expected.
In this patch, all such method calls explicitly set their locale to Locale.US. This patch also contains
a checkstyle rule which fails the compilation if toLowerCase or toUpperCase is used.
We prefer calls to methods in LocalizeString class which use US locale.
patch by Ata İlhan Köktürk; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-19953
Co-authored-by: Maxwell Guo <cclive1601@gmail.com>
Co-authored-by: Stefan Miklosovic <smiklosovic@apacheorg>
* During replacement, correctly set token on the joining instance
* In bootstrap, we were not correctly stepping through the join
operation
* When investigating bootstrap issues, it was found that we were
not running repairPaxosForTopologyChange on this path.
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for
CASSANDRA-19997
Both CASSANDRA-18120 and CASSANDRA-19946 updated cassandra_latest.yaml but not the corresponding test configs
patch by Mick Semb Wever; reviewed by Brandon Williams, Tiago L. Alves for CASSANDRA-20002
patch by Caleb Rackliffe; reviewed by David Capwell and Sam Tunnicliffe for CASSANDRA-19848
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
Batchlog endpoint strategy was previously only random placements on other racks. Options now are random_remote, prefer_local, dynamic_remote, and dynamic.
patch by Shayne Hunsaker; reviewed by Mick Semb Wever, Brandon Williams for CASSANDRA-18120
Also provide a clearer message from DatabaseDescriptor about the failing combination
patch by Mick Semb Wever; reviewed by David Capwell, Štefan Miklošovič for CASSANDRA-19812
Allows custom implementations of IAuthenticator to return their own
AuthenticateMessage based on ClientState information.
ClientState contains information about driver's name and version which
could be used to determine the contents of the AuthenticateMessage that
is sent back to the clients. This enables, for instance, returning
driver's known authenticator implementations (e.g. DseAuthenticator)
which enables SASL negotiation.
patch by Tiago Alves; reviewed by Mick Semb Wever, Andy Tolbert for CASSANDRA-19984
Uses ParameterizedClass for IAuthorizer, INetworkAuthorizer, and
IRoleManager implementations enabling those to be configurable from
parameters specified directly in cassandra.yaml.
Opportunistically makes consistent the initialization and setting of
all auth-related implementations and removes code duplication.
Notes:
* IInternodeAuthenticator implementations are expected to be set as
default directly in DatabaseDescriptor instead of done via
AuthConfig.applyAuth(). This is assumed in tests and client logic.
For instance ReconnectableSnitchHelperTest fetches this authenticator
before calling daemonInitialize(). Also, BulkLoader fetches this
directly when creating an outbound connection.
* Changing this behavior in BulkLoader causes a cascade of changes.
First, one would need to add AuthConfig.applyAuth() directly in
clientInitialize() and then would need to enable all the additional
classes that this change causes. Long term this might be justified
as if we're depending on the auth logic to be properly set. However,
in the context of this change it was decided to postpone further
changes.
* Standardize auth-related configurations by using a short-form with
the class name instead of the full qualified class name containing
the package name.
patch by Tiago Alves; reviewed by Mick Semb Wever, Stefan Miklosovic for CASSANDRA-19946