Skip to content

Commit 723f415

Browse files
fix ratis master suite flakes
1 parent 37ad9a8 commit 723f415

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

master/src/test/java/org/apache/celeborn/service/deploy/master/clustermeta/ha/RatisMasterStatusSystemSuiteJ.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ public static void resetRaftServer(
119119

120120
while (!serversStarted) {
121121
try {
122+
// Re-point each server to a fresh storage directory on every attempt. Ratis releases the
123+
// storage directory lock asynchronously on close(), so a failed attempt (e.g. a random
124+
// ratis port collision) can leave the previous directory locked. Reusing the same
125+
// directory on retry then fails with "directory is already locked"; allocating a clean
126+
// directory each time avoids contending for a lock that has not been released yet.
127+
configureServerConf(conf1, 1);
128+
configureServerConf(conf2, 2);
129+
configureServerConf(conf3, 3);
130+
122131
STATUSSYSTEM1 = new HAMasterMetaManager(mockRpcEnv, conf1);
123132
STATUSSYSTEM2 = new HAMasterMetaManager(mockRpcEnv, conf2);
124133
STATUSSYSTEM3 = new HAMasterMetaManager(mockRpcEnv, conf3);

0 commit comments

Comments
 (0)