Skip to content

Commit 3f76bb7

Browse files
committed
Fixed tags updated on restarts
1 parent 332e276 commit 3f76bb7

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

common/src/main/proto/TransportMessages.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ message PbMetaRegisterWorkerRequest {
221221
map<string, PbResourceConsumption> userResourceConsumption = 7;
222222
int32 internalPort = 8;
223223
string networkLocation = 9;
224-
repeated string tags = 12;
225224
}
226225

227226
message PbHeartbeatFromWorker {

master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/AbstractMetaManager.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,10 @@ public void updateRegisterWorkerMeta(
380380
}
381381
workerInfo.updateDiskSlots(estimatedPartitionSize);
382382
synchronized (workersMap) {
383-
workersMap.putIfAbsent(workerInfo.toUniqueId(), workerInfo);
383+
WorkerInfo existingWorkerInfo = workersMap.putIfAbsent(workerInfo.toUniqueId(), workerInfo);
384+
if (existingWorkerInfo != null) {
385+
existingWorkerInfo.tags_$eq(new HashSet<>(tags));
386+
}
384387
shutdownWorkers.remove(workerInfo);
385388
lostWorkers.remove(workerInfo);
386389
excludedWorkers.remove(workerInfo);

0 commit comments

Comments
 (0)