Mihaly Szjatinya has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22734
Change subject: WIP IMPALA-10268: Validate the debug actions when they are set ...................................................................... WIP IMPALA-10268: Validate the debug actions when they are set This patch aims to extract existing verifications on DEBUG_ACTION query option format onto SetQueryOption() stage, in order to prevent failures on execution stage. Also it localizes verification code for two existing types of debug actions. There are two types of debug actions, global e.g. 'RECVR_ADD_BATCH:FAIL' and ExecNode debug actions, e.g. '0:GETNEXT:FAIL'. Two types are implemented independetely in source code, both having verification code intertwined with execution. In case of global debug actions most of the code inside exising DebugActionImpl() consists of verification, therefore it make sense to make a wrapper around it for separating out the execution code. Things are worse for ExecNode debug actions, where verification code is sparsed between DebugOptions() constructor and ExecNode::ExecDebugActionImpl(). Additionaly some verification in constructor produces warnings, while ExecDebugActionImpl() verification either fails on DCHECK() or (in single case) returns error. For this case reasonable solution seems to be simply calling the constructor for temporary object and extracting verification code from ExecDebugActionImpl(). This has the drawback of having the same warning being produced two times. Finally, having extracted verification code for both types, logic in impala::SetQueryOption() combines the two verification mechanisms. Note: In the long run it is better to write a single verification routine for both Global and ExecNode debug actions, ideally as part of a general unification of the two existing debug_action mechanisms. With this in mind, current patch intends to preserve current behaviour, while avoiding complex refactoring. Change-Id: I53816aba2c79b556688d3b916883fee7476fdbb5 --- M be/src/exec/exec-node.cc M be/src/exec/exec-node.h M be/src/runtime/debug-options.cc M be/src/runtime/debug-options.h M be/src/service/query-options.cc M be/src/util/debug-util.cc M be/src/util/debug-util.h A tests/query_test/test_debug_action.py 8 files changed, 198 insertions(+), 36 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/34/22734/1 -- To view, visit http://gerrit.cloudera.org:8080/22734 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I53816aba2c79b556688d3b916883fee7476fdbb5 Gerrit-Change-Number: 22734 Gerrit-PatchSet: 1 Gerrit-Owner: Mihaly Szjatinya <msz...@pm.me>