]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/log
rocksdb.git
7 years agoIntroduce CacheAllocator, a custom allocator for cache blocks (#4437)
Igor Canadi [Wed, 3 Oct 2018 00:21:54 +0000 (17:21 -0700)]
Introduce CacheAllocator, a custom allocator for cache blocks (#4437)

Summary:
This is a conceptually simple change, but it touches many files to
pass the allocator through function calls.

We introduce CacheAllocator, which can be used by clients to configure
custom allocator for cache blocks. Our motivation is to hook this up
with folly's `JemallocNodumpAllocator`
(https://github.com/facebook/folly/blob/f43ce6d6866b7b994b3019df561109afae050ebc/folly/experimental/JemallocNodumpAllocator.h),
but there are many other possible use cases.

Additionally, this commit cleans up memory allocation in
`util/compression.h`, making sure that all allocations are wrapped in a
unique_ptr as soon as possible.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4437

Differential Revision: D10132814

Pulled By: yiwu-arbug

fbshipit-source-id: be1343a4b69f6048df127939fea9bbc96969f564

7 years agoFix compile error with jemalloc (#4488)
Yi Wu [Fri, 12 Oct 2018 18:48:52 +0000 (11:48 -0700)]
Fix compile error with jemalloc (#4488)

Summary:
The "je_" prefix of jemalloc APIs presents only when the macro `JEMALLOC_NO_RENAME` from jemalloc.h presents.

With the patch I'm also adding -DROCKSDB_JEMALLOC flag in buck TARGETS.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4488

Differential Revision: D10355971

Pulled By: yiwu-arbug

fbshipit-source-id: 03a2d69790a44ac89219c7525763fa937a63d95a

7 years agoUpdate HISTORY.md
Anand Ananthabhotla [Fri, 19 Oct 2018 23:38:03 +0000 (16:38 -0700)]
Update HISTORY.md

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

7 years agoHandle mixed slowdown/no_slowdown writer properly (#4475)
Anand Ananthabhotla [Wed, 10 Oct 2018 05:50:59 +0000 (22:50 -0700)]
Handle mixed slowdown/no_slowdown writer properly (#4475)

Summary:
There is a bug when the write queue leader is blocked on a write
delay/stop, and the queue has writers with WriteOptions::no_slowdown set
to true. They are not woken up until the write stall is cleared.

The fix introduces a dummy writer inserted at the tail to indicate a
write stall and prevent further inserts into the queue, and a condition
variable that writers who can tolerate slowdown wait on before adding
themselves to the queue. The leader calls WriteThread::BeginWriteStall()
to add the dummy writer and then walk the queue to fail any writers with
no_slowdown set. Once the stall clears, the leader calls
WriteThread::EndWriteStall() to remove the dummy writer and signal the
condition variable.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4475

Differential Revision: D10285827

Pulled By: anand1976

fbshipit-source-id: 747465e5e7f07a829b1fb0bc1afcd7b93f4ab1a9

7 years agoFix WriteBatchWithIndex's SeekForPrev() (#4559)
Siying Dong [Fri, 19 Oct 2018 21:38:32 +0000 (14:38 -0700)]
Fix WriteBatchWithIndex's SeekForPrev() (#4559)

Summary:
WriteBatchWithIndex's SeekForPrev() has a bug that we internally place the position just before the seek key rather than after. This makes the iterator to miss the result that is the same as the seek key. Fix it by position the iterator equal or smaller.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4559

Differential Revision: D10468534

Pulled By: siying

fbshipit-source-id: 2fb371ae809c561b60a1c11cef71e1c66fea1f19