]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/log
rocksdb.git
9 years agoutil/thread_local.h: silence a clang-build warning wip-rocksdb
Kefu Chai [Mon, 9 Jan 2017 08:54:06 +0000 (16:54 +0800)]
util/thread_local.h: silence a clang-build warning

otherwise clang complains with

/home/jenkins/workspace/ceph-master/src/rocksdb/util/thread_local.h:205:5:
error: macro expansion producing 'defined' has undefined behavior
[-Werror,-Wexpansion-to-defined]
^
/home/jenkins/workspace/ceph-master/src/rocksdb/util/thread_local.h:22:4:
note: expanded from macro 'ROCKSDB_SUPPORT_THREAD_LOCAL'
!defined(OS_WIN) && !defined(OS_MACOSX) && !defined(IOS_CROSS_COMPILE)
^`

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
9 years agocmake: check -momit-leaf-frame-pointer before using it
Kefu Chai [Tue, 10 Jan 2017 04:52:55 +0000 (12:52 +0800)]
cmake: check -momit-leaf-frame-pointer before using it

because not all archs supports this option. see
https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html.

also do not pass "-fno-omit-frame-pointer" and
"-momit-leaf-frame-pointer" to compiler if ${CMAKE_BUILD_TYPE} is
"Debug". this matches the behaviour of DEBUG_LEVEL=2 in Makefile.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
9 years agoFix deadlock when calling getMergedHistogram
Changli Gao [Mon, 21 Nov 2016 02:14:33 +0000 (18:14 -0800)]
Fix deadlock when calling getMergedHistogram

Summary:
When calling StatisticsImpl::HistogramInfo::getMergedHistogram(), if
there is a dying thread, which is calling
ThreadLocalPtr::StaticMeta::OnThreadExit() to merge its thread values to
HistogramInfo, deadlock will occur. Because the former try to hold
merge_lock then ThreadMeta::mutex_, but the later try to hold
ThreadMeta::mutex_ then merge_lock. In short, the locking order isn't
the same.

This patch addressed this issue by releasing merge_lock before folding
thread values.
Closes https://github.com/facebook/rocksdb/pull/1552

Differential Revision: D4211942

Pulled By: ajkr

fbshipit-source-id: ef89bcb

9 years agoRemove Arena in RangeDelAggregator
Andrew Kryczka [Sat, 19 Nov 2016 22:14:35 +0000 (14:14 -0800)]
Remove Arena in RangeDelAggregator

Summary:
The Arena construction/destruction introduced significant overhead to read-heavy workload just by creating empty vectors for its blocks, so avoid it in RangeDelAggregator.
Closes https://github.com/facebook/rocksdb/pull/1547

Differential Revision: D4207781

Pulled By: ajkr

fbshipit-source-id: 9d1c130

9 years agoUse more efficient hash map for deadlock detection
Manuel Ung [Sat, 19 Nov 2016 19:34:26 +0000 (11:34 -0800)]
Use more efficient hash map for deadlock detection

Summary:
Currently, deadlock cycles are held in std::unordered_map. The problem with it is that it allocates/deallocates memory on every insertion/deletion. This limits throughput since we're doing this expensive operation while holding a global mutex. Fix this by using a vector which caches memory instead.

Running the deadlock stress test, this change increased throughput from 39k txns/s -> 49k txns/s. The effect is more noticeable in MyRocks.
Closes https://github.com/facebook/rocksdb/pull/1545

Differential Revision: D4205662

Pulled By: lth

fbshipit-source-id: ff990e4

9 years agoSkip ldb test in Travis
Siying Dong [Sat, 19 Nov 2016 03:20:15 +0000 (19:20 -0800)]
Skip ldb test in Travis

Summary:
Travis now is building for ldb tests. Disable for now to unblock other tests while we are investigating.
Closes https://github.com/facebook/rocksdb/pull/1546

Differential Revision: D4209404

Pulled By: siying

fbshipit-source-id: 47edd97

9 years agoDirect I/O Reads Handle the last sector correctly.
Siying Dong [Sat, 19 Nov 2016 03:17:25 +0000 (19:17 -0800)]
Direct I/O Reads Handle the last sector correctly.

Summary:
Currently, in the Direct I/O read mode, the last sector of the file, if not full, is not handled correctly. If the return value of pread is not multiplier of kSectorSize, we still go ahead and continue reading, even if the buffer is not aligned. With the commit, if the return value is not multiplier of kSectorSize, and all but the last sector has been read, we simply return.
Closes https://github.com/facebook/rocksdb/pull/1550

Differential Revision: D4209609

Pulled By: lightmark

fbshipit-source-id: cb0b439

9 years agoImplement PositionedAppend for PosixWritableFile
Maysam Yabandeh [Sat, 19 Nov 2016 01:06:37 +0000 (17:06 -0800)]
Implement PositionedAppend for PosixWritableFile

Summary:
This patch clarifies the contract of PositionedAppend with some unit
tests and also implements it for PosixWritableFile. (Tasks: 14524071)
Closes https://github.com/facebook/rocksdb/pull/1514

Differential Revision: D4204907

Pulled By: maysamyabandeh

fbshipit-source-id: 06eabd2

9 years agoLazily initialize RangeDelAggregator's map and pinning manager
Andrew Kryczka [Sat, 19 Nov 2016 00:54:09 +0000 (16:54 -0800)]
Lazily initialize RangeDelAggregator's map and pinning manager

Summary:
Since a RangeDelAggregator is created for each read request, these heap-allocating member variables were consuming significant CPU (~3% total) which slowed down request throughput. The map and pinning manager are only necessary when range deletions exist, so we can defer their initialization until the first range deletion is encountered. Currently lazy initialization is done for reads only since reads pass us a single snapshot, which is easier to store on the stack for later insertion into the map than the vector passed to us by flush or compaction.

Note the Arena member variable is still expensive, I will figure out what to do with it in a subsequent diff. It cannot be lazily initialized because we currently use this arena even to allocate empty iterators, which is necessary even when no range deletions exist.
Closes https://github.com/facebook/rocksdb/pull/1539

Differential Revision: D4203488

Pulled By: ajkr

fbshipit-source-id: 3b36279

9 years agocmake: s/STEQUAL/STREQUAL/
Kefu Chai [Fri, 18 Nov 2016 22:41:30 +0000 (14:41 -0800)]
cmake: s/STEQUAL/STREQUAL/

Summary:
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Closes https://github.com/facebook/rocksdb/pull/1540

Differential Revision: D4207564

Pulled By: siying

fbshipit-source-id: 567415b

9 years agoRelease RocksDB 5.0
Islam AbdelRahman [Fri, 18 Nov 2016 02:31:55 +0000 (18:31 -0800)]
Release RocksDB 5.0

Summary:
Update HISTORY.md and version.h
Closes https://github.com/facebook/rocksdb/pull/1536

Differential Revision: D4202987

Pulled By: IslamAbdelRahman

fbshipit-source-id: 94985e3