Squashed 'src/leveldb/' changes from c521b3ac65..64052c76c5

64052c76c5 Merge #15: Add filename to corruption errors
135ed0fb4e Add filename to corruption errors

git-subtree-dir: src/leveldb
git-subtree-split: 64052c76c567cff3dad32d1db0ef969d97b5882f
This commit is contained in:
MarcoFalke
2018-02-16 08:59:04 -05:00
parent b13a68e129
commit 835a21b424
9 changed files with 32 additions and 8 deletions

View File

@@ -191,6 +191,9 @@ class SequentialFile {
// REQUIRES: External synchronization
virtual Status Skip(uint64_t n) = 0;
// Get a name for the file, only for error reporting
virtual std::string GetName() const = 0;
private:
// No copying allowed
SequentialFile(const SequentialFile&);
@@ -215,6 +218,9 @@ class RandomAccessFile {
virtual Status Read(uint64_t offset, size_t n, Slice* result,
char* scratch) const = 0;
// Get a name for the file, only for error reporting
virtual std::string GetName() const = 0;
private:
// No copying allowed
RandomAccessFile(const RandomAccessFile&);
@@ -234,6 +240,9 @@ class WritableFile {
virtual Status Flush() = 0;
virtual Status Sync() = 0;
// Get a name for the file, only for error reporting
virtual std::string GetName() const = 0;
private:
// No copying allowed
WritableFile(const WritableFile&);