Skip to content

Commit

Permalink
modified
Browse files Browse the repository at this point in the history
  • Loading branch information
JiayuZzz committed Jul 11, 2019
1 parent efc0fe9 commit 81cfa76
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Expand Up @@ -27,10 +27,13 @@ env:

# For GCC build, we also report code coverage to codecov.
matrix:
# For osx, there is a unused-command-line-argument error in RocksDB cmake file with TSAN
exclude:
- os: osx
env: SANITIZER="TSAN"
- os: osx
env: SANITIZER="UBSAN"
- os: osx
env: BUILD_TYPE="Release"
include:
- os: linux
compiler:
Expand All @@ -45,7 +48,7 @@ matrix:
install:
# osx dependencies
- if [ "${TRAVIS_OS_NAME}" == osx ]; then
brew install gflags zstd lz4 snappy xz;
brew install gflags zstd lz4 snappy xz;
fi
- git clone --depth=1 --branch=tikv-3.0 https://github.com/pingcap/rocksdb.git
- export CTEST_OUTPUT_ON_FAILURE=1
Expand Down
7 changes: 3 additions & 4 deletions CMakeLists.txt
Expand Up @@ -39,8 +39,8 @@ if (WITH_TITAN_TESTS OR WITH_TITAN_TOOLS)
add_subdirectory(${ROCKSDB_DIR} rocksdb EXCLUDE_FROM_ALL)
# -latomic is needed when building titandb_stress using clang.
# check if libatomic exist before link
find_library(ATOMIC_EXIST NAMES atomic libatomic.so.1 atomic.so.1)
if(ATOMIC_EXIST)
find_library(HAS_ATOMIC NAMES atomic libatomic.so.1 atomic.so.1)
if (HAS_ATOMIC)
link_libraries(atomic)
endif()
endif()
Expand Down Expand Up @@ -83,8 +83,7 @@ if (WITH_TITAN_TOOLS)
else()
# Hack: On Travis (with Ubuntu xenial or before), libgflags-dev package doesn't come with
# gflags-config.cmake, so find_package will fail. Hard-code gflag path for now.
if(APPLE)
else()
if (NOT APPLE)
set(gflags_INCLUDE_DIR "/usr/include/gflags")
list(APPEND TOOLS_LIBS "/usr/lib/x86_64-linux-gnu/libgflags.a")
endif()
Expand Down
4 changes: 3 additions & 1 deletion src/blob_file_iterator.cc
Expand Up @@ -167,12 +167,14 @@ void BlobFileMergeIterator::SeekToFirst() {
}

void BlobFileMergeIterator::Next() {
assert(current_ != nullptr);
assert(Valid());
current_->Next();
if (current_->status().ok() && current_->Valid()) min_heap_.push(current_);
if (!min_heap_.empty()) {
current_ = min_heap_.top();
min_heap_.pop();
} else {
current_ = nullptr;
}
}

Expand Down

0 comments on commit 81cfa76

Please sign in to comment.