[docdb] Make gflag update safe in production #5892
Labels
area/docdb
YugabyteDB core features
kind/enhancement
This is an enhancement of an existing feature
priority/medium
Medium priority issue
Jira Link: DB-2070
Currently, we have a
yb-ts-cli set_flag
command that we use to update gflags in production, without restarting servers. Some gflags are runtime safe that way, allowing us to dynamically enable/disable certain features, or tweak various parameters.However, while
set_flag
uses aSetAtomic
primitive for updating the gflags, the rest of the code does not use the corresponding concurrency safeGetAtomic
, thus leaving us with race conditions in prod, when updating flags this way!We should fix that, either by patching the gflag library itself somehow, or at least introducing a macro to be used across the codebase, when reading gflags, which uses
GetAtomic
under the hood.cc @mbautin @spolitov @robertsami
Note: this is the proper fix over the short term, test-only #5800
The text was updated successfully, but these errors were encountered: