From: Yueh-Hsuan Chiang Date: Wed, 9 Mar 2016 00:46:41 +0000 (-0800) Subject: Improve comment in compaction.h and compaction_picker.h X-Git-Tag: rocksdb-4.6.1~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aa3f02d50cdaff11a2fdb25f585994610d2f2108;p=rocksdb.git Improve comment in compaction.h and compaction_picker.h 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 --- diff --git a/db/compaction.h b/db/compaction.h index dc8712363..729c4edaf 100644 --- a/db/compaction.h +++ b/db/compaction.h @@ -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" diff --git a/db/compaction_picker.h b/db/compaction_picker.h index b8611b4cb..0503c8692 100644 --- a/db/compaction_picker.h +++ b/db/compaction_picker.h @@ -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