This is an automated email from the ASF dual-hosted git repository.
smiklosovic pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2180a34bbb Revert "Add a system property to set hostId if not yet
initialized"
2180a34bbb is described below
commit 2180a34bbb3443126168c733644b092aac1d731c
Author: Stefan Miklosovic <[email protected]>
AuthorDate: Wed Apr 27 21:03:00 2022 +0200
Revert "Add a system property to set hostId if not yet initialized"
This reverts commit 33ff36cc42a083311065dee56adc1d72d6866f2d.
patch by Stefan Miklosovic; reviewed by Brandon Williams and Sam
Tunnicliffe for CASSANDRA-14582
---
CHANGES.txt | 1 -
conf/jvm-server.options | 3 ---
src/java/org/apache/cassandra/db/SystemKeyspace.java | 6 ++----
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 3f3a782cc3..a1250b714a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -149,7 +149,6 @@
* Log when compacting many tombstones (CASSANDRA-16780)
* Display bytes per level in tablestats for LCS tables (CASSANDRA-16799)
* Add isolated flush timer to CommitLogMetrics and ensure writes correspond
to single WaitingOnCommit data points (CASSANDRA-16701)
- * Add a system property to set hostId if not yet initialized (CASSANDRA-14582)
* GossiperTest.testHasVersion3Nodes didn't take into account trunk version
changes, fixed to rely on latest version (CASSANDRA-16651)
* Update JNA library to 5.9.0 and snappy-java to version 1.1.8.4
(CASSANDRA-17040)
Merged from 4.0:
diff --git a/conf/jvm-server.options b/conf/jvm-server.options
index f7845d4113..46967f4ad7 100644
--- a/conf/jvm-server.options
+++ b/conf/jvm-server.options
@@ -22,9 +22,6 @@
# and perhaps have affinity.
#-Dcassandra.available_processors=number_of_processors
-# Specify host id for the first boot and persist it
-#-Dcassandra.host_id_first_boot=host_id
-
# The directory location of the cassandra.yaml file.
#-Dcassandra.config=directory
diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java
b/src/java/org/apache/cassandra/db/SystemKeyspace.java
index a4d71fe132..9b67d22046 100644
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@ -1219,15 +1219,13 @@ public final class SystemKeyspace
return hostId;
// ID not found, generate a new one, persist, and then return it.
- String hostString = System.getProperty("cassandra.host_id_first_boot",
UUID.randomUUID().toString());
- hostId = UUID.fromString(hostString);
+ hostId = UUID.randomUUID();
logger.warn("No host ID found, created {} (Note: This should happen
exactly once per node).", hostId);
return setLocalHostId(hostId);
}
/**
- * Sets the local host ID explicitly. Should only be called outside of
SystemTable when replacing a node.
- * Used also in CASSANDRA-14582.
+ * Sets the local host ID explicitly. Should only be called outside of
SystemTable when replacing a node.
*/
public static synchronized UUID setLocalHostId(UUID hostId)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]