Environment
- Yugabyte Platform - less than 2.12
Issue
- After setting a new gflag, task fails in platform and a tserver is marked failed
- See logs in
tserver.err
like the following:
ERROR: illegal value '0.3' specified for int64 flag 'global_memstore_size_percentage'
Resolution
In this instance, we passed a flag that a “float” value rather than an “int64” value.
In this case, global_memstore_size_percentage
should be 30, indicating 30%
Always make sure to match the flag value provided in platform to the variable type of the flag.
Product improvement
Improved gflag validation is present in product version 2.12, as tracked internal issue number PLAT-2466
Diagnostics
Each flag defined by the tserver has specific variable type - string
, int64
, bool
, etc.
- Using the incorrect datatype for a flag (ie. using
60s
instead of60
to represent 60 seconds) will cause the tserver to fail to start with an error message showing the incorrect type, as seen here:
ERROR: illegal value '0.3' specified for int64 flag 'global_memstore_size_percentage'
For any given flag, you can see the type and default value of the flag by searching it in the codebase:
# global_memstore_size_percentage is type int64 with default value 10
# acceptable values are integers - float values like 12.2 will be rejected
$ grep -Rn 'global_memstore_size_percentage' . | grep DEFINE
./src/yb/tserver/tablet_memory_manager.cc:42:DEFINE_int64(global_memstore_size_percentage, 10,
# log_segment_size_mb is type int32 with default value 64
# acceptable values are integers - float values like 12.2 will be rejected
$ grep -Rn 'log_segment_size_mb' . | grep DEFINE
./src/yb/consensus/log_util.cc:61:DEFINE_int32(log_segment_size_mb, 64,
# ysql_enable_auth is type boolean with default value false
# acceptable values are "true" and "false"
$ grep -Rn 'ysql_enable_auth' . | grep DEFINE
./src/yb/yql/pgwrapper/pg_wrapper.cc:54:DEFINE_bool(ysql_enable_auth, false,
Comments
0 comments
Please sign in to leave a comment.