浏览代码

Use System::nanoTime as default time source in SharedBlobCacheService (#109420)

We need to use `System#nanoTime` here. We use this time source for
measuring the timing of blob IO. The 200ms default accuracy isn't enough
here, we need accurate timing.
Armin Braun 1 年之前
父节点
当前提交
25b77ea366

+ 1 - 1
x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java

@@ -335,7 +335,7 @@ public class SharedBlobCacheService<KeyType> implements Releasable {
         String ioExecutor,
         BlobCacheMetrics blobCacheMetrics
     ) {
-        this(environment, settings, threadPool, ioExecutor, blobCacheMetrics, threadPool::relativeTimeInNanos);
+        this(environment, settings, threadPool, ioExecutor, blobCacheMetrics, System::nanoTime);
     }
 
     public SharedBlobCacheService(