Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24475 )
Change subject: KUDU-3785: Fix CLI flag validator failure ...................................................................... KUDU-3785: Fix CLI flag validator failure A customer issue was discovered during rolling restarts where the tserver flagfile is passed to CLI commands (e.g. kudu fs dump --flagfile=tserver.flags). The CLI previously inflated rpc_max_message_size to ~2GB via SET_FLAGS_DEFAULT in tool_main.cc to accommodate large RPC responses. This caused the GROUP_FLAG_VALIDATOR in op_tracker.cc to reject any flagfile that set tablet_transaction_memory_limit_mb below 2GB (e.g. 256MB < 2GB -> failure). The root cause is that inflating rpc_max_message_size as a global flag is a layering violation: it's a client-side concern that pollutes process-wide state and triggers global validators. The fix moves the large message size into BuildMessenger(), which is the single chokepoint for all CLI RPC messengers. If the user has not explicitly set --rpc_max_message_size, the messenger gets min(INT32_MAX, available_memory); otherwise their explicit value is honored. The global flag is never mutated, so the validator sees the compiled default (50MB) and passes regardless of flagfile contents. Server subcommands are unaffected since they build their own messengers through the normal server path. A regression test verifies the flagfile scenario, and a unit test confirms BuildMessenger produces a messenger with a large max message size. Change-Id: Idd24ec605bd14ce90ed8a5705230ff96d77d0d64 Reviewed-on: http://gerrit.cloudera.org:8080/24475 Reviewed-by: Ashwani Raina <[email protected]> Tested-by: Marton Greber <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> Reviewed-by: Abhishek Chennaka <[email protected]> Reviewed-by: Zoltan Chovan <[email protected]> --- M src/kudu/tools/kudu-tool-test.cc M src/kudu/tools/tool_action_common.cc M src/kudu/tools/tool_main.cc 3 files changed, 116 insertions(+), 42 deletions(-) Approvals: Ashwani Raina: Looks good to me, but someone else must approve Marton Greber: Verified Alexey Serbin: Looks good to me, approved Abhishek Chennaka: Looks good to me, approved Zoltan Chovan: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/24475 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idd24ec605bd14ce90ed8a5705230ff96d77d0d64 Gerrit-Change-Number: 24475 Gerrit-PatchSet: 6 Gerrit-Owner: Marton Greber <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]>
