You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "andresbeckruiz (via GitHub)" <gi...@apache.org> on 2026/07/07 18:44:13 UTC
Re: [PR] CASSSIDECAR-377: Implement job coordination for cluster-wide operations [cassandra-sidecar]
andresbeckruiz commented on code in PR #360:
URL: https://github.com/apache/cassandra-sidecar/pull/360#discussion_r3538859540
##########
server/src/main/java/org/apache/cassandra/sidecar/job/OperationalJobManager.java:
##########
@@ -131,4 +150,26 @@ private void checkConflict(OperationalJob job) throws OperationalJobConflictExce
throw new OperationalJobConflictException("The same operational job is already running on Cassandra. operationName='" + job.name() + '\'');
}
}
+
+ /**
+ * For jobs that require cluster-wide coordination, attempts to acquire the active operation lock
+ * via the coordinator. Throws a conflict if another operation is already active.
+ *
+ * @param job instance of the job to coordinate
+ * @throws OperationalJobConflictException when the coordinator cannot activate the operation
+ */
+ private void tryCoordination(OperationalJob job) throws OperationalJobConflictException
+ {
+ if (job.requiresCoordination())
+ {
+ Preconditions.checkState(coordinator != null,
Review Comment:
No more unhandled `IllegalStateException`, addressed in [a2bd0e1](https://github.com/apache/cassandra-sidecar/pull/360/commits/a2bd0e15ce73f49a2223212df48a3daa6b2bd436)
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org