Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Wang Xixu, Joe McDonnell, I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/20270 to look at the new patch set (#8). Change subject: KUDU-3461 [client] Avoid impala crash by returning error if invalid tablet id found ...................................................................... KUDU-3461 [client] Avoid impala crash by returning error if invalid tablet id found Kudu C++ client doesn't invalidate cache if Java client issued a DDL op on the partition where data is inserted into the partition that was altered by java client in between. Because of that, kudu c++ client goes into infinite recursion calls and eventually impala daemon crashes due to stack overflow. The short-term fix is to avoid crash by detecting the invalid tablet id condition and return error from kudu c++ client to impala daemon. Following are the steps to reproduce the issue from impala-shell: +++ 1. drop table if exists impala_crash; 2. create table if not exists impala_crash \ ( dt string, col string, primary key(dt) ) \ partition by range(dt) ( partition values <= '00000000' ) \ stored as kudu; 3. alter table impala_crash drop if exists range partition value='20230301'; 4. alter table impala_crash add if not exists range partition value='20230301'; 5. insert into impala_crash values ('20230301','abc'); 6. alter table impala_crash drop if exists range partition value='20230301'; 7. alter table impala_crash add if not exists range partition value='20230301'; 8. insert into impala_crash values ('20230301','abc'); +++ The last statement i.e. #8 causes impalad (connected to impala-shell) to crash With this change, last statement query fails and throws "invalid tablet id" error. This change also includes unit test to test both scenarios: 1. Reproduce the infinite recursion case without a fix, expect it to crash 2. Reproduce the infinite recursion case with fix, expect it it return error instead of crashing due to stack overflow. Change-Id: Ia09cf6fb1b1d10f1ad13a62b5c863bcd1e3ab26a --- M src/kudu/client/batcher.cc M src/kudu/client/client-test.cc M src/kudu/client/meta_cache.cc M src/kudu/client/meta_cache.h 4 files changed, 256 insertions(+), 1 deletion(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/70/20270/8 -- To view, visit http://gerrit.cloudera.org:8080/20270 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia09cf6fb1b1d10f1ad13a62b5c863bcd1e3ab26a Gerrit-Change-Number: 20270 Gerrit-PatchSet: 8 Gerrit-Owner: Ashwani Raina <ara...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <ale...@apache.org> Gerrit-Reviewer: Ashwani Raina <ara...@cloudera.com> Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Wang Xixu <1450306...@qq.com>