Open es1024 opened 3 weeks ago
Jira Link: DB-13280
Code for validating gflag values is fairly verbose, e.g.
namespace { bool RpcMaxMessageSizeValidator(const char* flag_name, uint64_t value) { // This validation depends on the value of: protobuf_message_total_bytes_limit. DELAY_FLAG_VALIDATION_ON_STARTUP(flag_name); if (value >= FLAGS_protobuf_message_total_bytes_limit) { LOG_FLAG_VALIDATION_ERROR(flag_name, value) << "Must be less than protobuf_message_total_bytes_limit " << FLAGS_protobuf_message_total_bytes_limit; return false; } return true; } } // namespace DEFINE_validator(rpc_max_message_size, &RpcMaxMessageSizeValidator);
It's also fairly repetitive (e.g. flag A < flag B, flag > 0 checks are done in multiple places) and could be reduced.
kind/enhancement
Lets backport to 2024.2 as we plan to backport the CDC fix that needs this.
Jira Link: DB-13280
Description
Code for validating gflag values is fairly verbose, e.g.
It's also fairly repetitive (e.g. flag A < flag B, flag > 0 checks are done in multiple places) and could be reduced.
Issue Type
kind/enhancement
Warning: Please confirm that this issue does not contain any sensitive information