This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 27ac602 [clock] add 'unsafe' tag for --use_hybrid_clock
27ac602 is described below
commit 27ac602108ab5e6b4e2211c2bfae3b36badc3121
Author: Alexey Serbin <[email protected]>
AuthorDate: Mon Jan 24 21:24:35 2022 -0800
[clock] add 'unsafe' tag for --use_hybrid_clock
Adding the 'unsafe' tag to the hidden --use_hybrid_clock flag makes
it impossible to start a Kudu server with --use_hybrid_clock=false
unless --unlock_unsafe_flags is specified. This is to discourage
using LogicalClock implementation instead of HybridClock implementation
in regular (i.e. non-test) environments.
This is a follow-up to 96a6a8b91bd069ed5ebe3dfd4eb8179708eacda9.
Change-Id: I46579c071697ddcee808a708677364be6e7a4a19
Reviewed-on: http://gerrit.cloudera.org:8080/18171
Reviewed-by: Attila Bukor <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/clock/hybrid_clock.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/kudu/clock/hybrid_clock.cc b/src/kudu/clock/hybrid_clock.cc
index d52c7fb..d217c07 100644
--- a/src/kudu/clock/hybrid_clock.cc
+++ b/src/kudu/clock/hybrid_clock.cc
@@ -75,8 +75,14 @@ TAG_FLAG(max_clock_sync_error_usec, runtime);
DEFINE_bool(use_hybrid_clock, true,
"Whether HybridClock should be used as the default clock "
- "implementation. This should be disabled for testing purposes
only.");
+ "implementation. Setting this flag to 'false' is highly "
+ "discouraged in any production-grade deployment, as it can "
+ "introduce extensive latency and surprising behavior such as not "
+ "operating in COMMIT_WAIT consistency mode, failing to handle scan
"
+ "operations in READ_AT_SNAPSHOT and READ_YOUR_WRITES modes, etc. "
+ "This flag may be set to 'false' for testing purposes only.");
TAG_FLAG(use_hybrid_clock, hidden);
+TAG_FLAG(use_hybrid_clock, unsafe);
DEFINE_int32(hybrid_clock_inject_init_delay_ms, 0,
"If enabled, injects the given number of milliseconds delay into "