]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/db/job_context.h
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / rocksdb / db / job_context.h
index af640dab29f1f26ebdfda9ffe2b369db27736d71..3978fad33c947b58137512929a92f1059f0c2215 100644 (file)
@@ -30,7 +30,8 @@ struct SuperVersionContext {
 #ifndef ROCKSDB_DISABLE_STALL_NOTIFICATION
   autovector<WriteStallNotification> write_stall_notifications;
 #endif
-  unique_ptr<SuperVersion> new_superversion;  // if nullptr no new superversion
+  std::unique_ptr<SuperVersion>
+      new_superversion;  // if nullptr no new superversion
 
   explicit SuperVersionContext(bool create_superversion = false)
     : new_superversion(create_superversion ? new SuperVersion() : nullptr) {}
@@ -44,7 +45,7 @@ struct SuperVersionContext {
   }
 
   void NewSuperVersion() {
-    new_superversion = unique_ptr<SuperVersion>(new SuperVersion());
+    new_superversion = std::unique_ptr<SuperVersion>(new SuperVersion());
   }
 
   inline bool HaveSomethingToDelete() const {
@@ -174,6 +175,9 @@ struct JobContext {
   size_t num_alive_log_files = 0;
   uint64_t size_log_to_delete = 0;
 
+  // Snapshot taken before flush/compaction job.
+  std::unique_ptr<ManagedSnapshot> job_snapshot;
+
   explicit JobContext(int _job_id, bool create_superversion = false) {
     job_id = _job_id;
     manifest_file_number = 0;
@@ -203,6 +207,7 @@ struct JobContext {
 
     memtables_to_free.clear();
     logs_to_free.clear();
+    job_snapshot.reset();
   }
 
   ~JobContext() {