Skip to content

Commit 90730f1

Browse files
committed
fix
1 parent f2e5d08 commit 90730f1

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
import org.apache.fluss.server.coordinator.event.NewTabletServerEvent;
6666
import org.apache.fluss.server.coordinator.event.NotifyKvSnapshotOffsetEvent;
6767
import org.apache.fluss.server.coordinator.event.NotifyLeaderAndIsrResponseReceivedEvent;
68-
import org.apache.fluss.server.coordinator.event.watcher.CoordinatorServerChangeWatcher;
6968
import org.apache.fluss.server.coordinator.event.SchemaChangeEvent;
69+
import org.apache.fluss.server.coordinator.event.watcher.CoordinatorServerChangeWatcher;
7070
import org.apache.fluss.server.coordinator.event.watcher.TableChangeWatcher;
7171
import org.apache.fluss.server.coordinator.event.watcher.TabletServerChangeWatcher;
7272
import org.apache.fluss.server.coordinator.statemachine.ReplicaState;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ public void notLeader() {
100100
// Later we can make it as a hot backup server to continuously synchronize metadata from
101101
// Zookeeper, which save time from initializing context
102102
// leaderLatch.await();
103-
// initLeaderServices.run();
104103

105104
} catch (Exception e) {
106105
LOG.error("Failed to start LeaderLatch for server {}", serverId, e);

fluss-server/src/test/java/org/apache/fluss/server/coordinator/CoordinatorServerTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,12 @@ public void waitUntilCoordinatorServerElected() {
8080
() -> zookeeperClient.getCoordinatorLeaderAddress().isPresent(),
8181
Duration.ofSeconds(10),
8282
"Fail to wait coordinator server elected");
83+
// Sleep 1 second to make sure coordinator server has been started and event processor
84+
// started.
85+
try {
86+
Thread.sleep(1000);
87+
} catch (InterruptedException e) {
88+
throw new RuntimeException(e);
89+
}
8390
}
8491
}

fluss-server/src/test/java/org/apache/fluss/server/testutils/FlussClusterExtension.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,13 @@ public void waitUntilCoordinatorServerElected() {
869869
() -> zooKeeperClient.getCoordinatorLeaderAddress().isPresent(),
870870
Duration.ofSeconds(10),
871871
"Fail to wait coordinator server elected");
872+
// Sleep 1 second to make sure coordinator server has been started and event processor
873+
// started.
874+
try {
875+
Thread.sleep(1000);
876+
} catch (InterruptedException e) {
877+
throw new RuntimeException(e);
878+
}
872879
}
873880

874881
// --------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)