From 72bad6c5abe60f9de8ca57ec38a76215b384e312 Mon Sep 17 00:00:00 2001 From: adiholden Date: Tue, 14 Feb 2023 16:30:14 +0200 Subject: [PATCH] fix(replica) : replica will not sync execution multi shard commands as default (#800) -sfix(replica) : replica will not sync execution multi shard commands as default --- .github/workflows/regression-tests.yml | 3 ++- src/server/replica.cc | 2 +- src/server/transaction.cc | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index dad61f5f3..3e38d056d 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -58,7 +58,8 @@ jobs: run: | cd ${GITHUB_WORKSPACE}/tests export DRAGONFLY_PATH="${GITHUB_WORKSPACE}/build/dragonfly" # used by PyTests - pytest -xvs dragonfly/replication_test.py --df alsologtostderr --df vmodule=replica=2 + pytest -xvs dragonfly/replication_test.py --df alsologtostderr --df vmodule=replica=2 --df enable_multi_shard_sync=true + pytest -xvs dragonfly/replication_test.py --df alsologtostderr --df vmodule=replica=2 --df enable_multi_shard_sync=false - name: Send notification on failure if: failure() || cancelled() diff --git a/src/server/replica.cc b/src/server/replica.cc index 0e942b61a..fdb03feba 100644 --- a/src/server/replica.cc +++ b/src/server/replica.cc @@ -27,7 +27,7 @@ extern "C" { #include "strings/human_readable.h" #include "util/proactor_base.h" -ABSL_FLAG(bool, enable_multi_shard_sync, true, +ABSL_FLAG(bool, enable_multi_shard_sync, false, "Execute multi shards commands on replica syncrhonized"); ABSL_DECLARE_FLAG(uint32_t, port); diff --git a/src/server/transaction.cc b/src/server/transaction.cc index edcdbabd8..f982fe5fa 100644 --- a/src/server/transaction.cc +++ b/src/server/transaction.cc @@ -178,7 +178,7 @@ void Transaction::InitMultiData(KeyIndex key_index) { } void Transaction::StoreKeysInArgs(KeyIndex key_index, bool rev_mapping) { - DCHECK_EQ(key_index.bonus, 0); + DCHECK_EQ(key_index.bonus, 0U); auto args = cmd_with_full_args_;