Skip to content

Commit 16971df

Browse files
committed
minor cleanup
1 parent 212186a commit 16971df

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/src/main/java/org/elasticsearch/indices/IndicesService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ static Map<Index, List<IndexShardStats>> statsByShard(final IndicesService indic
541541
// Second pass: build stats, compute shared RAM on the fly
542542
for (final IndexService indexService : indicesService) {
543543
for (final IndexShard indexShard : indexService) {
544-
org.elasticsearch.index.shard.ShardId shardId = indexShard.shardId();
544+
ShardId shardId = indexShard.shardId();
545545
long cacheSize = hasQueryCache ? queryCache.getCacheSizeForShard(shardId) : 0L;
546546
long sharedRam = 0L;
547547
if (sharedRamBytesUsed != 0L) {
@@ -552,7 +552,7 @@ static Map<Index, List<IndexShardStats>> statsByShard(final IndicesService indic
552552
}
553553
}
554554
try {
555-
final IndexShardStats indexShardStats = indicesService.indexShardStats(indicesService, indexShard, flags, sharedRam);
555+
final IndexShardStats indexShardStats = indicesService.indexShardStats(indicesService, indexShard, flags);
556556
if (indexShardStats == null) {
557557
continue;
558558
}
@@ -570,7 +570,8 @@ static Map<Index, List<IndexShardStats>> statsByShard(final IndicesService indic
570570
}
571571

572572
IndexShardStats indexShardStats(final IndicesService indicesService, final IndexShard indexShard, final CommonStatsFlags flags) {
573-
return indexShardStats(indicesService, indexShard, flags, null);
573+
// Default to 0L for precomputedSharedRam for backward compatibility
574+
return indexShardStats(indicesService, indexShard, flags, 0L);
574575
}
575576

576577
IndexShardStats indexShardStats(

0 commit comments

Comments
 (0)