Skip to content

Commit

Permalink
PLAT-7206: fix CircleCI on rocksdb 7.3.1. (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewvon authored Jan 22, 2025
1 parent 8e0f495 commit d6214b7
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 43 deletions.
51 changes: 19 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ commands:
- run:
name: Install JDK 8 on macos
command: |
brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
HOMEBREW_NO_AUTO_UPDATE=1 brew tap bell-sw/liberica
HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask liberica-jdk8
increase-max-open-files-on-macos:
steps:
Expand Down Expand Up @@ -172,8 +173,8 @@ executors:
jobs:
build-macos:
macos:
xcode: 12.5.1
resource_class: large
xcode: 13.4.1
resource_class: m2pro.medium
environment:
ROCKSDB_DISABLE_JEMALLOC: 1 # jemalloc cause env_test hang, disable it for now
steps:
Expand All @@ -185,8 +186,8 @@ jobs:

build-macos-cmake:
macos:
xcode: 12.5.1
resource_class: large
xcode: 13.4.1
resource_class: m2pro.medium
parameters:
run_even_tests:
description: run even or odd tests, used to split tests to 2 groups
Expand Down Expand Up @@ -417,7 +418,10 @@ jobs:
steps:
- checkout # check out the code in the project directory
- run: apt-get update -y && apt-get install -y libgflags-dev
- run: make V=1 -j8 unity_test
- run:
name: "Unity build"
command: make V=1 -j8 unity_test
no_output_timeout: 20m
- run: make V=1 -j8 -k check-headers # could be moved to a different build
- post-steps

Expand Down Expand Up @@ -621,10 +625,10 @@ jobs:

build-macos-java:
macos:
xcode: 12.5.1
resource_class: large
xcode: 13.4.1
resource_class: m2pro.medium
environment:
JAVA_HOME: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
JAVA_HOME: /Library/Java/JavaVirtualMachines/liberica-jdk-8.jdk/Contents/Home
ROCKSDB_DISABLE_JEMALLOC: 1 # jemalloc causes java 8 crash
steps:
- increase-max-open-files-on-macos
Expand All @@ -645,10 +649,10 @@ jobs:

build-macos-java-static:
macos:
xcode: 12.5.1
resource_class: large
xcode: 13.4.1
resource_class: m2pro.medium
environment:
JAVA_HOME: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
JAVA_HOME: /Library/Java/JavaVirtualMachines/liberica-jdk-8.jdk/Contents/Home
steps:
- increase-max-open-files-on-macos
- install-gflags-on-macos
Expand All @@ -669,10 +673,10 @@ jobs:

build-macos-java-static-universal:
macos:
xcode: 12.5.1
resource_class: large
xcode: 13.4.1
resource_class: m2pro.medium
environment:
JAVA_HOME: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
JAVA_HOME: /Library/Java/JavaVirtualMachines/liberica-jdk-8.jdk/Contents/Home
steps:
- increase-max-open-files-on-macos
- install-gflags-on-macos
Expand Down Expand Up @@ -863,20 +867,7 @@ workflows:
jobs-linux-other-checks:
jobs:
- build-linux-clang10-clang-analyze
- build-linux-unity-and-headers
- build-linux-mini-crashtest
jobs-windows:
jobs:
- build-windows:
name: "build-windows-vs2019"
- build-windows:
name: "build-windows-vs2019-cxx20"
extra_cmake_opt: -DCMAKE_CXX_STANDARD=20
- build-windows:
name: "build-windows-vs2017"
vs_year: "2017"
cmake_generator: "Visual Studio 15 Win64"
- build-cmake-mingw
jobs-java:
jobs:
- build-linux-java
Expand All @@ -887,10 +878,6 @@ workflows:
jobs-macos:
jobs:
- build-macos
- build-macos-cmake:
run_even_tests: true
- build-macos-cmake:
run_even_tests: false
jobs-linux-arm:
jobs:
- build-linux-arm
Expand Down
2 changes: 1 addition & 1 deletion cache/fast_lru_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void LRUHandleTable::Resize() {
std::unique_ptr<LRUHandle* []> new_list {
new LRUHandle* [size_t{1} << new_length_bits] {}
};
uint32_t count = 0;
[[maybe_unused]] uint32_t count = 0;
for (uint32_t i = 0; i < old_length; i++) {
LRUHandle* h = list_[i];
while (h != nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion cache/lru_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void LRUHandleTable::Resize() {
std::unique_ptr<LRUHandle* []> new_list {
new LRUHandle* [size_t{1} << new_length_bits] {}
};
uint32_t count = 0;
[[maybe_unused]] uint32_t count = 0;
for (uint32_t i = 0; i < old_length; i++) {
LRUHandle* h = list_[i];
while (h != nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion db/db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3301,7 +3301,7 @@ static bool CompareIterators(int step, DB* model, DB* db,
options.snapshot = db_snap;
Iterator* dbiter = db->NewIterator(options);
bool ok = true;
int count = 0;
[[maybe_unused]] int count = 0;
for (miter->SeekToFirst(), dbiter->SeekToFirst();
ok && miter->Valid() && dbiter->Valid(); miter->Next(), dbiter->Next()) {
count++;
Expand Down
2 changes: 1 addition & 1 deletion db/version_edit_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void VersionEditHandlerBase::Iterate(log::Reader& reader,
assert(log_read_status);
assert(log_read_status->ok());

size_t recovered_edits = 0;
[[maybe_unused]] size_t recovered_edits = 0;
Status s = Initialize();
while (reader.LastRecordEnd() < max_manifest_read_size_ && s.ok() &&
reader.ReadRecord(&record, &scratch) && log_read_status->ok()) {
Expand Down
2 changes: 1 addition & 1 deletion db/version_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3113,7 +3113,7 @@ void VersionStorageInfo::SetFinalized() {
assert(MaxBytesForLevel(level) >= max_bytes_prev_level);
max_bytes_prev_level = MaxBytesForLevel(level);
}
int num_empty_non_l0_level = 0;
[[maybe_unused]] int num_empty_non_l0_level = 0;
for (int level = 0; level < num_levels(); level++) {
assert(LevelFiles(level).size() == 0 ||
LevelFiles(level).size() == LevelFilesBrief(level).num_files);
Expand Down
2 changes: 1 addition & 1 deletion file/prefetch_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ TEST_P(PrefetchTest, Basic) {
// count the keys
{
auto iter = std::unique_ptr<Iterator>(db_->NewIterator(ReadOptions()));
int num_keys = 0;
[[maybe_unused]] int num_keys = 0;
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
num_keys++;
}
Expand Down
2 changes: 1 addition & 1 deletion memtable/inlineskiplist_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ class TestState {
static void ConcurrentReader(void* arg) {
TestState* state = reinterpret_cast<TestState*>(arg);
Random rnd(state->seed_);
int64_t reads = 0;
[[maybe_unused]] int64_t reads = 0;
state->Change(TestState::RUNNING);
while (!state->quit_flag_.load(std::memory_order_acquire)) {
state->t_.ReadStep(&rnd);
Expand Down
2 changes: 1 addition & 1 deletion memtable/skiplist_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ class TestState {
static void ConcurrentReader(void* arg) {
TestState* state = reinterpret_cast<TestState*>(arg);
Random rnd(state->seed_);
int64_t reads = 0;
[[maybe_unused]] int64_t reads = 0;
state->Change(TestState::RUNNING);
while (!state->quit_flag_.load(std::memory_order_acquire)) {
state->t_.ReadStep(&rnd);
Expand Down
2 changes: 1 addition & 1 deletion table/block_based/block_based_table_reader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class BlockBasedTableReaderBaseTest : public testing::Test {
// Internal key is constructed directly from this key,
// and internal key size is required to be >= 8 bytes,
// so use %08u as the format string.
sprintf(k, "%08u", key);
snprintf(k, sizeof(k), "%08u", key);
std::string v;
if (mixed_with_human_readable_string_value) {
v = (block % 2) ? rnd.HumanReadableString(256)
Expand Down
4 changes: 2 additions & 2 deletions tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6807,8 +6807,8 @@ class Benchmark {

fprintf(stderr, "num reads to do %" PRIu64 "\n", reads_);
Duration duration(FLAGS_duration, reads_);
uint64_t num_seek_to_first = 0;
uint64_t num_next = 0;
[[maybe_unused]] uint64_t num_seek_to_first = 0;
[[maybe_unused]] uint64_t num_next = 0;
while (!duration.Done(1)) {
if (!iter->Valid()) {
iter->SeekToFirst();
Expand Down
1 change: 1 addition & 0 deletions util/cleanable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <atomic>
#include <cassert>
#include <utility>

namespace ROCKSDB_NAMESPACE {

Expand Down

0 comments on commit d6214b7

Please sign in to comment.