Cyrill commented on code in PR #7507:
URL: https://github.com/apache/ignite-3/pull/7507#discussion_r2853086135
##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/client/RaftCommandExecutor.java:
##########
@@ -203,74 +272,133 @@ void shutdown(Throwable stopException) {
}
/**
- * Resolves initial target peer for a command execution.
+ * Marks the executor as stopping. After this call, operations will fail
with an exception from the
+ * stopping exception factory instead of TimeoutException.
+ */
+ void markAsStopping() {
+ stopping = true;
+ }
+
+ /**
+ * Returns the current leader.
+ *
+ * @return Current leader or {@code null} if unknown.
+ */
+ @Nullable Peer leader() {
+ return leader;
+ }
+
+ /**
+ * Sets the current leader. Used by PhysicalTopologyAwareRaftGroupService
to update state from response.
*
- * <p>Tries the known leader first, falling back to a random peer if no
leader is known.
+ * @param leader New leader.
+ */
+ void setLeader(@Nullable Peer leader) {
Review Comment:
changed
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]