Skip to content

Commit 888b84a

Browse files
committed
Fixed tags updated on restarts
1 parent 3d0abc3 commit 888b84a

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
@@ -381,7 +381,10 @@ public void updateRegisterWorkerMeta(
381381
}
382382
workerInfo.updateDiskSlots(estimatedPartitionSize);
383383
synchronized (workersMap) {
384-
workersMap.putIfAbsent(workerInfo.toUniqueId(), workerInfo);
384+
WorkerInfo existingWorkerInfo = workersMap.putIfAbsent(workerInfo.toUniqueId(), workerInfo);
385+
if (existingWorkerInfo != null) {
386+
existingWorkerInfo.tags_$eq(new HashSet<>(tags));
387+
}
385388
shutdownWorkers.remove(workerInfo);
386389
lostWorkers.remove(workerInfo);
387390
excludedWorkers.remove(workerInfo);

0 commit comments

Comments
 (0)