]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/utilities/persistent_cache/block_cache_tier.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / utilities / persistent_cache / block_cache_tier.h
index 13b04f95a7363f4f5902fbc9c66d1a0b1a7462e0..1aac287cc0ed9e65fa67f030dc4a18e92b030902 100644 (file)
@@ -6,9 +6,9 @@
 
 #ifndef ROCKSDB_LITE
 
-#ifndef  OS_WIN
+#ifndef OS_WIN
 #include <unistd.h>
-#endif // ! OS_WIN
+#endif  // ! OS_WIN
 
 #include <atomic>
 #include <list>
 #include <string>
 #include <thread>
 
-#include "rocksdb/cache.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/persistent_cache.h"
-
-#include "utilities/persistent_cache/block_cache_tier_file.h"
-#include "utilities/persistent_cache/block_cache_tier_metadata.h"
-#include "utilities/persistent_cache/persistent_cache_util.h"
-
 #include "memory/arena.h"
 #include "memtable/skiplist.h"
 #include "monitoring/histogram.h"
 #include "port/port.h"
+#include "rocksdb/cache.h"
+#include "rocksdb/comparator.h"
+#include "rocksdb/persistent_cache.h"
+#include "rocksdb/system_clock.h"
 #include "util/coding.h"
 #include "util/crc32c.h"
 #include "util/mutexlock.h"
+#include "utilities/persistent_cache/block_cache_tier_file.h"
+#include "utilities/persistent_cache/block_cache_tier_metadata.h"
+#include "utilities/persistent_cache/persistent_cache_util.h"
 
 namespace ROCKSDB_NAMESPACE {
 
@@ -46,7 +45,8 @@ class BlockCacheTier : public PersistentCacheTier {
       : opt_(opt),
         insert_ops_(static_cast<size_t>(opt_.max_write_pipeline_backlog_size)),
         buffer_allocator_(opt.write_buffer_size, opt.write_buffer_count()),
-        writer_(this, opt_.writer_qdepth, static_cast<size_t>(opt_.writer_dispatch_size)) {
+        writer_(this, opt_.writer_qdepth,
+                static_cast<size_t>(opt_.writer_dispatch_size)) {
     Info(opt_.log, "Initializing allocator. size=%d B count=%" ROCKSDB_PRIszt,
          opt_.write_buffer_size, opt_.write_buffer_count());
   }
@@ -74,7 +74,7 @@ class BlockCacheTier : public PersistentCacheTier {
   void TEST_Flush() override {
     while (insert_ops_.Size()) {
       /* sleep override */
-      Env::Default()->SleepForMicroseconds(1000000);
+      SystemClock::Default()->SleepForMicroseconds(1000000);
     }
   }
 
@@ -148,7 +148,7 @@ class BlockCacheTier : public PersistentCacheTier {
   ThreadedWriter writer_;                       // Writer threads
   BlockCacheTierMetadata metadata_;             // Cache meta data manager
   std::atomic<uint64_t> size_{0};               // Size of the cache
-  Statistics stats_;                                 // Statistics
+  Statistics stats_;                            // Statistics
 };
 
 }  // namespace ROCKSDB_NAMESPACE