X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Frocksdb%2Fdb%2Fjob_context.h;h=3978fad33c947b58137512929a92f1059f0c2215;hb=494da23a05e25ed98f5539f3b89e6af3cafe3fec;hp=af640dab29f1f26ebdfda9ffe2b369db27736d71;hpb=931c18d5142274109ebfaecd012da8e5a3ebc67e;p=ceph.git diff --git a/ceph/src/rocksdb/db/job_context.h b/ceph/src/rocksdb/db/job_context.h index af640dab2..3978fad33 100644 --- a/ceph/src/rocksdb/db/job_context.h +++ b/ceph/src/rocksdb/db/job_context.h @@ -30,7 +30,8 @@ struct SuperVersionContext { #ifndef ROCKSDB_DISABLE_STALL_NOTIFICATION autovector write_stall_notifications; #endif - unique_ptr new_superversion; // if nullptr no new superversion + std::unique_ptr + 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(new SuperVersion()); + new_superversion = std::unique_ptr(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 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() {