Skip to content

Commit ba62ff6

Browse files
committed
Use com.carrotsearch.hppc.ObjectIntMap.addTo
1 parent e9f32a0 commit ba62ff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4505,7 +4505,7 @@ private Collection<LongWithAttributes> getShardsByState() {
45054505
for (SnapshotsInProgress.Entry snapshot : snapshotsInProgress.forRepo(projectId, repository.name())) {
45064506
for (ShardSnapshotStatus shardSnapshotStatus : snapshot.shards().values()) {
45074507
if (shardCounts.containsKey(shardSnapshotStatus.state())) {
4508-
shardCounts.put(shardSnapshotStatus.state(), shardCounts.get(shardSnapshotStatus.state()) + 1);
4508+
shardCounts.addTo(shardSnapshotStatus.state(), 1);
45094509
}
45104510
}
45114511
}

0 commit comments

Comments
 (0)