summaryrefslogtreecommitdiff
path: root/db/db_impl.h
diff options
context:
space:
mode:
authorDavid Grogan <dgrogan@chromium.org>2013-08-21 11:12:47 -0700
committerDavid Grogan <dgrogan@chromium.org>2013-08-21 11:12:47 -0700
commit748539c183453bdeaff1eb0da8ccf5adacb796e7 (patch)
tree6a1712798e5cc172b79e1113d9c1a0fc93496fa7 /db/db_impl.h
parent5bd76dc10d840df23255ba0e635083a2a94e0461 (diff)
downloadleveldb-748539c183453bdeaff1eb0da8ccf5adacb796e7.tar.gz
LevelDB 1.13v1.13
Fix issues 77, 87, 182, 190. Additionally, fix the bug described in https://groups.google.com/d/msg/leveldb/yL6h1mAOc20/vLU64RylIdMJ where a large contiguous keyspace of deleted data was not getting compacted. Also fix a bug where options.max_open_files was not getting clamped properly.
Diffstat (limited to 'db/db_impl.h')
-rw-r--r--db/db_impl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/db/db_impl.h b/db/db_impl.h
index 3c8d711..75fd30a 100644
--- a/db/db_impl.h
+++ b/db/db_impl.h
@@ -59,13 +59,19 @@ class DBImpl : public DB {
// file at a level >= 1.
int64_t TEST_MaxNextLevelOverlappingBytes();
+ // Record a sample of bytes read at the specified internal key.
+ // Samples are taken approximately once every config::kReadBytesPeriod
+ // bytes.
+ void RecordReadSample(Slice key);
+
private:
friend class DB;
struct CompactionState;
struct Writer;
Iterator* NewInternalIterator(const ReadOptions&,
- SequenceNumber* latest_snapshot);
+ SequenceNumber* latest_snapshot,
+ uint32_t* seed);
Status NewDB();
@@ -135,6 +141,7 @@ class DBImpl : public DB {
WritableFile* logfile_;
uint64_t logfile_number_;
log::Writer* log_;
+ uint32_t seed_; // For sampling.
// Queue of writers.
std::deque<Writer*> writers_;