fix WritableFile buffer size in direct IO
Summary:
�fix the buffer size in case of ppl use buffer size as their block_size.
Closes https://github.com/facebook/rocksdb/pull/2198
Differential Revision:
D4956878
Pulled By: lightmark
fbshipit-source-id:
8bb0dc9c133887aadcd625d5261a3d1110b71473
Add user stats Reset API
Summary:
It resets all the ticker and histogram stats to zero. Needed to change the locking a bit since Reset() is the only operation that manipulates multiple tickers/histograms together, and that operation should be seen as atomic by other operations that access tickers/histograms.
Closes https://github.com/facebook/rocksdb/pull/2213
Differential Revision:
D4952232
Pulled By: ajkr
fbshipit-source-id:
c0475c3e4c7b940120d53891b69c3091149a0679
add prefetch to PosixRandomAccessFile in buffered io
Summary:
Every time after a compaction/flush finish, we issue user reads to put the table into block cache which includes a couple of IO that read footer, index blocks, meta block, etc. So we implement Prefetch here to reduce IO.
Closes https://github.com/facebook/rocksdb/pull/2196
Differential Revision:
D4931782
Pulled By: lightmark
fbshipit-source-id:
5a13d58dcab209964352322217193bbf7ff78149
Extract statistics tests into separate file
Summary:
I'm going to add more DB tests for statistics as currently we have very few. I started a file dedicated to this purpose and moved the existing stats-specific tests there.
Closes https://github.com/facebook/rocksdb/pull/2211
Differential Revision:
D4951558
Pulled By: ajkr
fbshipit-source-id:
05d11c35079c40ecabdfd2cf5556ccb761f694a4
support bulk loading with universal compaction
Summary:
Support buck load with universal compaction.
More test cases to be added.
Closes https://github.com/facebook/rocksdb/pull/2202
Differential Revision:
D4935360
Pulled By: lightmark
fbshipit-source-id:
cc3ca1b6f42faa503207dab1408d6bcf393ee5b5
add <sys/sysmacros.h> to avoid warning with glibc 2.25
Summary:
https://github.com/facebook/rocksdb/issues/2152
Closes https://github.com/facebook/rocksdb/pull/2208
Differential Revision:
D4945577
Pulled By: lightmark
fbshipit-source-id:
4e679150f2c9443d3be0b6008b26b65fabbda75a
Reunite checkpoint and backup core logic
Summary:
These code paths forked when checkpoint was introduced by copy/pasting the core backup logic. Over time they diverged and bug fixes were sometimes applied to one but not the other (like fix to include all relevant WALs for 2PC), or it required extra effort to fix both (like fix to forge CURRENT file). This diff reunites the code paths by extracting the core logic into a function, CreateCustomCheckpoint(), that is customizable via callbacks to implement both checkpoint and backup.
Related changes:
- flush_before_backup is now forcibly enabled when 2PC is enabled
- Extracted CheckpointImpl class definition into a header file. This is so the function, CreateCustomCheckpoint(), can be called by internal rocksdb code but not exposed to users.
- Implemented more functions in DummyDB/DummyLogFile (in backupable_db_test.cc) that are used by CreateCustomCheckpoint().
Closes https://github.com/facebook/rocksdb/pull/1932
Differential Revision:
D4622986
Pulled By: ajkr
fbshipit-source-id:
157723884236ee3999a682673b64f7457a7a0d87
call GetRootDB() before cast to DBImpl* in CancelAllBackgroundWork
Summary:
User could call this with wrapper class of DB or DBImpl
Closes https://github.com/facebook/rocksdb/pull/2200
Differential Revision:
D4935530
Pulled By: lightmark
fbshipit-source-id:
df9cb61d67d0f3bbcf62f714d77523a459a92883