From 6a5700b3e8f0efcada2ab8501fca7d2cfd8bb777 Mon Sep 17 00:00:00 2001 From: Paul Chandler Date: Mon, 16 Sep 2024 11:18:12 +0100 Subject: [PATCH] Cassandra based distributed locking mechanism # 741 - Cassandra tables called lock and lock_priority, to manage task execution and synchronization across multiple nodes. --- .gitignore | 22 ------------------- CHANGES.md | 1 - .../AgentNativeConnectionProvider.java | 1 + application/src/main/resources/ecc.yml | 7 +++--- 4 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 94278c9f..00000000 --- a/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -target/ -META-INF/ -OSGI-INF/ -build.properties -pom.xml.versionsBackup -dependency-reduced-pom.xml -*~ -*.bak -.checkstyle -.classpath -.project -.settings/ -.toDelete -*.pyc -.idea/ -*.iml -.coverage -*htmlcov -application/statistics/ -statistics/ -.vscode/ - diff --git a/CHANGES.md b/CHANGES.md index 566b8232..215a0b2b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,6 @@ * Create New Repair Type Called "VNODE" - Issue #755 * Create ReplicaRepairGroup Class for Grouping Replicas and Token Ranges - Issue #721 * Hot Reload of Nodes List - Issue #699 -* Update nodes when cluster changes, nodes removed or added #699 * Investigate Creation of RepairScheduler and ScheduleManager #714 * Implement ScheduledJobQueue for Prioritized Job Management and Execution - Issue #740 * Implement RepairGroup Class for Managing and Executing Repair Tasks - Issue #738 diff --git a/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/providers/AgentNativeConnectionProvider.java b/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/providers/AgentNativeConnectionProvider.java index 452a5661..8b471f16 100644 --- a/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/providers/AgentNativeConnectionProvider.java +++ b/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/providers/AgentNativeConnectionProvider.java @@ -94,6 +94,7 @@ public AgentNativeConnectionProvider( .withSslEngineFactory(sslEngineFactory) .withSchemaChangeListener(defaultRepairConfigurationProvider) .withNodeStateListener(defaultRepairConfigurationProvider); + LOG.info("Preparing Agent Connection Config"); nativeConnectionBuilder = resolveAgentProviderBuilder(nativeConnectionBuilder, agentConnectionConfig); LOG.info("Establishing Connection With Nodes"); diff --git a/application/src/main/resources/ecc.yml b/application/src/main/resources/ecc.yml index ed88f3cb..03d83718 100644 --- a/application/src/main/resources/ecc.yml +++ b/application/src/main/resources/ecc.yml @@ -293,12 +293,11 @@ rest_server: cache_expiry_time_in_seconds: 30 ## ## Allow to override consistency level for LWT (lightweight transactions). Possible values are: - ## "DEFAULT" - Use consistency level based on remoteRouting. ## "SERIAL" - Use SERIAL consistency for LWT regardless of remoteRouting. ## "LOCAL" - Use LOCAL_SERIAL consistency for LWT regardless of remoteRouting. ## - ## if you use remoteRouting: false and LOCAL then all locks will be taken locally - ## in DC. I.e There's a risk that multiple nodes in different datacenters will be able to lock the + ## if you use LOCAL then all locks will be taken locally in DC. + ## I.e There's a risk that multiple nodes in different datacenters will be able to lock the ## same nodes causing multiple repairs on the same range/node at the same time. ## - consistencySerial: "DEFAULT" + consistencySerial: "SERIAL"