]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Improve comment in compaction.h and compaction_picker.h
authorYueh-Hsuan Chiang <yhchiang@fb.com>
Wed, 9 Mar 2016 00:46:41 +0000 (16:46 -0800)
committerYueh-Hsuan Chiang <yhchiang@fb.com>
Wed, 9 Mar 2016 00:46:41 +0000 (16:46 -0800)
Summary:
ReleaseCompactionFiles must be called when DB mutex is held,
but the documentation is mission.

Test Plan: no code change

Reviewers: anthony, IslamAbdelRahman, kradhakrishnan, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D54987

db/compaction.h
db/compaction_picker.h

index dc87123636abe3851c38bc7688dcf7b1a0805916..729c4edafb3b8af1084b167420157a3ca7a439b1 100644 (file)
@@ -138,6 +138,8 @@ class Compaction {
 
   // Clear all files to indicate that they are not being compacted
   // Delete this compaction from the list of running compactions.
+  //
+  // Requirement: DB mutex held
   void ReleaseCompactionFiles(Status status);
 
   // Returns the summary of the compaction in "output" with maximum "len"
index b8611b4cb0d7f7775328033cd91b2c76f55b1ece..0503c869242ed5ad15c22bfd84153855caabc22a 100644 (file)
@@ -83,6 +83,8 @@ class CompactionPicker {
 #endif  // ROCKSDB_LITE
 
   // Free up the files that participated in a compaction
+  //
+  // Requirement: DB mutex held
   void ReleaseCompactionFiles(Compaction* c, Status status);
 
   // Returns true if any one of the specified files are being compacted