mirror of https://github.com/apache/cassandra
Disable reloading of GossipingPropertyFileSnitch
Patch by molsson; reviewed by pmotta for CASSANDRA-9474
This commit is contained in:
parent
acdbba7957
commit
f6deca3db2
|
|
@ -1,4 +1,5 @@
|
|||
2.1.13
|
||||
* Disable reloading of GossipingPropertyFileSnitch (CASSANDRA-9474)
|
||||
* Fix Stress profile parsing on Windows (CASSANDRA-10808)
|
||||
|
||||
|
||||
|
|
|
|||
16
NEWS.txt
16
NEWS.txt
|
|
@ -24,20 +24,18 @@ New features
|
|||
- DTCS option max_sstable_age_days is now deprecated and defaults to 1000 days.
|
||||
- Native protocol server now allows both SSL and non-SSL connections on
|
||||
the same port.
|
||||
- Switching racks is no longer an allowed operation on a node which has
|
||||
data. Instead, the node will need to be decommissioned and rebootstrapped.
|
||||
If moving from the SimpleSnitch, make sure the rack containing all current
|
||||
nodes is named "rack1". To override this behavior when manually wiping
|
||||
the node and bootstrapping, use -Dcassandra.ignore_rack=true.
|
||||
- a new validate(key, cf) method is added to PerRowSecondaryIndex. A default
|
||||
implementation is provided, so no changes are required to custom implementations.
|
||||
|
||||
Operations
|
||||
------------
|
||||
- Changing rack or dc of live nodes is no longer possible for PropertyFileSnitch
|
||||
and YamlFileNetworkTopologySnitch. Reloading the configuration file of
|
||||
GossipingPropertyFileSnitch has been disabled, CASSANDRA-10243.
|
||||
|
||||
- Switching data center or racks is no longer an allowed operation on a node
|
||||
which has data. Instead, the node will need to be decommissioned and
|
||||
rebootstrapped. If moving from the SimpleSnitch, make sure that the data
|
||||
center and rack containing all current nodes is named "datacenter1" and
|
||||
"rack1". To override this behaviour use -Dcassandra.ignore_rack=true and/or
|
||||
-Dcassandra.ignore_dc=true.
|
||||
- Reloading the configuration file of GossipingPropertyFileSnitch has been disabled.
|
||||
|
||||
2.1.11
|
||||
=====
|
||||
|
|
|
|||
|
|
@ -614,11 +614,26 @@ public class SystemKeyspace
|
|||
}
|
||||
}
|
||||
|
||||
String req = "SELECT rack, data_center FROM system.%s WHERE key='%s'";
|
||||
UntypedResultSet result = executeInternal(String.format(req, LOCAL_CF, LOCAL_KEY));
|
||||
|
||||
if (!Boolean.getBoolean("cassandra.ignore_dc"))
|
||||
{
|
||||
// Look up the dc (return it if found)
|
||||
if (!result.isEmpty() && result.one().has("data_center"))
|
||||
{
|
||||
String storedDc = result.one().getString("data_center");
|
||||
String currentDc = DatabaseDescriptor.getEndpointSnitch().getDatacenter(FBUtilities.getBroadcastAddress());
|
||||
if (!storedDc.equals(currentDc))
|
||||
{
|
||||
throw new ConfigurationException("Cannot start node if snitch's data center (" + currentDc + ") differs from previous data center (" + storedDc + "). " +
|
||||
"Please fix the snitch configuration, decommission and rebootstrap this node or use the flag -Dcassandra.ignore_dc=true.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Boolean.getBoolean("cassandra.ignore_rack"))
|
||||
{
|
||||
String req = "SELECT rack FROM system.%s WHERE key='%s'";
|
||||
UntypedResultSet result = executeInternal(String.format(req, LOCAL_CF, LOCAL_KEY));
|
||||
|
||||
// Look up the Rack (return it if found)
|
||||
if (!result.isEmpty() && result.one().has("rack"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue