Skip to content

Commit cc498bf

Browse files
LiebingYuLiebing
andauthored
[server] Close ZooKeeperClient only after all dependent components have been shut down to prevent exceptions (#2023)
Co-authored-by: Liebing <[email protected]>
1 parent 1ed4fc5 commit cc498bf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorServer.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -424,14 +424,6 @@ CompletableFuture<Void> stopServices() {
424424
exception = ExceptionUtils.firstOrSuppressed(t, exception);
425425
}
426426

427-
try {
428-
if (zkClient != null) {
429-
zkClient.close();
430-
}
431-
} catch (Throwable t) {
432-
exception = ExceptionUtils.firstOrSuppressed(t, exception);
433-
}
434-
435427
try {
436428
if (authorizer != null) {
437429
authorizer.close();
@@ -452,6 +444,14 @@ CompletableFuture<Void> stopServices() {
452444
exception = ExceptionUtils.firstOrSuppressed(t, exception);
453445
}
454446

447+
try {
448+
if (zkClient != null) {
449+
zkClient.close();
450+
}
451+
} catch (Throwable t) {
452+
exception = ExceptionUtils.firstOrSuppressed(t, exception);
453+
}
454+
455455
try {
456456
if (rpcClient != null) {
457457
rpcClient.close();

0 commit comments

Comments
 (0)