Skip to content

Commit 6330ba9

Browse files
committed
clear -> removeTracking
1 parent ba678a9 commit 6330ba9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/DesiredBalanceReconciler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ private void moveShards() {
494494

495495
if (assignment.nodeIds().contains(shardRouting.currentNodeId())) {
496496
// shard is already on a desired node
497-
undesiredAllocationsTracker.clear(shardRouting);
497+
undesiredAllocationsTracker.removeTracking(shardRouting);
498498
continue;
499499
}
500500

@@ -535,7 +535,7 @@ private void moveShards() {
535535
}
536536
} finally {
537537
if (movedUndesiredShard) {
538-
undesiredAllocationsTracker.clear(shardRouting);
538+
undesiredAllocationsTracker.removeTracking(shardRouting);
539539
} else {
540540
undesiredAllocationsTracker.trackUndesiredAllocation(shardRouting);
541541
}
@@ -572,7 +572,7 @@ private DesiredBalanceMetrics.AllocationStats balance() {
572572

573573
if (assignment.nodeIds().contains(shardRouting.currentNodeId())) {
574574
// shard is already on a desired node
575-
undesiredAllocationsTracker.clear(shardRouting);
575+
undesiredAllocationsTracker.removeTracking(shardRouting);
576576
continue;
577577
}
578578

@@ -621,7 +621,7 @@ private DesiredBalanceMetrics.AllocationStats balance() {
621621
}
622622
} finally {
623623
if (movedUndesiredShard) {
624-
undesiredAllocationsTracker.clear(shardRouting);
624+
undesiredAllocationsTracker.removeTracking(shardRouting);
625625
} else {
626626
undesiredAllocationsTracker.trackUndesiredAllocation(shardRouting);
627627
}

server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/UndesiredAllocationsTracker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ public void trackUndesiredAllocation(ShardRouting shardRouting) {
8484
}
8585

8686
/**
87-
* Clear any tracking of the provided allocation
87+
* Remove any tracking of the specified allocation (a no-op if the allocation isn't being tracked)
8888
*/
89-
public void clear(ShardRouting shardRouting) {
89+
public void removeTracking(ShardRouting shardRouting) {
9090
undesiredAllocations.remove(shardRouting);
9191
}
9292

0 commit comments

Comments
 (0)