diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-01-24 08:26:20 -0800 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-01-24 08:26:20 -0800 |
commit | d3ab598fd5261a89002c0b12913c4f3e22e82f33 (patch) | |
tree | aea7e8fda13d2d44a61be4ffa6217db9bd9911ed /src/leveldb/db/version_set.h | |
parent | 05e5e158878c4b1e5fa60d791b3022aae57d1206 (diff) | |
parent | 36311b9a194e3546006478157279383ffa624cf0 (diff) |
Merge pull request #2207 from gavinandresen/leveldb19
Leveldb19
Diffstat (limited to 'src/leveldb/db/version_set.h')
-rw-r--r-- | src/leveldb/db/version_set.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leveldb/db/version_set.h b/src/leveldb/db/version_set.h index 61c4c99a08..9d084fdb7d 100644 --- a/src/leveldb/db/version_set.h +++ b/src/leveldb/db/version_set.h @@ -21,6 +21,7 @@ #include "db/dbformat.h" #include "db/version_edit.h" #include "port/port.h" +#include "port/thread_annotations.h" namespace leveldb { @@ -159,7 +160,8 @@ class VersionSet { // current version. Will release *mu while actually writing to the file. // REQUIRES: *mu is held on entry. // REQUIRES: no other thread concurrently calls LogAndApply() - Status LogAndApply(VersionEdit* edit, port::Mutex* mu); + Status LogAndApply(VersionEdit* edit, port::Mutex* mu) + EXCLUSIVE_LOCKS_REQUIRED(mu); // Recover the last saved descriptor from persistent storage. Status Recover(); @@ -275,6 +277,8 @@ class VersionSet { void AppendVersion(Version* v); + bool ManifestContains(const std::string& record) const; + Env* const env_; const std::string dbname_; const Options* const options_; |