Remove concatenation in String.format() calls (#13038)

This commit is contained in:
Dmitry Cherniachenko 2024-01-30 00:13:31 +01:00 committed by GitHub
parent 239b83fca5
commit e3a6a4bd8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View File

@ -60,7 +60,8 @@ class PreCopyMergedSegmentWarmer implements IndexReaderWarmer {
primary.message(
String.format(
Locale.ROOT,
"top: done warm merge " + info + ": took %.3f sec, %.1f MB",
"top: done warm merge %s: took %.3f sec, %.1f MB",
info,
(System.nanoTime() - startNS) / (double) TimeUnit.SECONDS.toNanos(1),
info.sizeInBytes() / 1024. / 1024.));
primary.finishedMergedFiles.addAll(filesMetaData.keySet());

View File

@ -242,11 +242,9 @@ class SimplePrimaryNode extends PrimaryNode {
message(
String.format(
Locale.ROOT,
"top: warning: still warming merge "
+ info
+ " to "
+ preCopy.connections.size()
+ " replicas for %.1f sec...",
"top: warning: still warming merge %s to %d replicas for %.1f sec...",
info,
preCopy.connections.size(),
(ns - startNS) / (double) TimeUnit.SECONDS.toNanos(1)));
lastWarnNS = ns;
}