fresh-borzoni commented on code in PR #3647:
URL: https://github.com/apache/fluss/pull/3647#discussion_r3587954030
##########
fluss-server/src/main/java/org/apache/fluss/server/tablet/TabletService.java:
##########
@@ -359,12 +362,26 @@ public CompletableFuture<GetTableStatsResponse>
getTableStats(GetTableStatsReque
public CompletableFuture<NotifyLeaderAndIsrResponse> notifyLeaderAndIsr(
NotifyLeaderAndIsrRequest notifyLeaderAndIsrRequest) {
CompletableFuture<NotifyLeaderAndIsrResponse> response = new
CompletableFuture<>();
+ int coordinatorEpoch = notifyLeaderAndIsrRequest.getCoordinatorEpoch();
List<NotifyLeaderAndIsrData> notifyLeaderAndIsrRequestData =
getNotifyLeaderAndIsrRequestData(notifyLeaderAndIsrRequest);
- replicaManager.becomeLeaderOrFollower(
- notifyLeaderAndIsrRequest.getCoordinatorEpoch(),
- notifyLeaderAndIsrRequestData,
- result ->
response.complete(makeNotifyLeaderAndIsrResponse(result)));
+ try {
+ replicaStateChangeExecutor.execute(
Review Comment:
Should stopReplicas go through this executor too?
It takes the same replicaStateChangeLock but still runs on the RPC worker,
so a stop can now overtake queued notifies, which the per-connection ordering
used to prevent.
Same-executor for both would fix the ordering, and also keep stops from
blocking an RPC worker on the lock while a slow transition runs.
WDYT?
--
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]