Ashwani Raina has uploaded this change for review. (
http://gerrit.cloudera.org:8080/20270
Change subject: [client] Avoid impala crash by returning error if invalid
tablet id found
......................................................................
[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.
Change-Id: Ia09cf6fb1b1d10f1ad13a62b5c863bcd1e3ab26a
---
M src/kudu/client/batcher.cc
M src/kudu/client/meta_cache.cc
M src/kudu/client/meta_cache.h
3 files changed, 67 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/70/20270/1
--
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: newchange
Gerrit-Change-Id: Ia09cf6fb1b1d10f1ad13a62b5c863bcd1e3ab26a
Gerrit-Change-Number: 20270
Gerrit-PatchSet: 1
Gerrit-Owner: Ashwani Raina <[email protected]>