impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4828: Alter Kudu schema outside Impala may crash on read
Date Tue, 07 Feb 2017 22:53:53 GMT
Matthew Jacobs has uploaded a new patch set (#3).

Change subject: IMPALA-4828: Alter Kudu schema outside Impala may crash on read

IMPALA-4828: Alter Kudu schema outside Impala may crash on read

Creating a table in Impala, changing the column schema
outside of Impala, and then reading again in Impala may
result in a crash. Neither Impala nor the Kudu client
validates the schema immediately before reading, so Impala
may attempt to dereference pointers that aren't there. This
happens if a string column is dropped and then a new, non
string column is added with the old string column's name.

This change adds validation after opening a scan token to
ensure the projection schema matches the expected schema.
The scan is guaranteed to be valid while the KuduScanner is
open, even if the schema changes concurrently. This is the
latest point and coursest granularity with which Impala
can detect and gracefully handle a schema mismatch.

Also handles the cases where columns were added or removed.

Testing: Adds test cases for these scenarios.

Change-Id: I6d43f5bb9811e728ad592933066d006c8fb4553a
M be/src/exec/
M be/src/exec/kudu-scanner.h
M be/src/exec/
M be/src/exec/kudu-util.h
M be/src/runtime/descriptors.h
M common/thrift/
M tests/query_test/
7 files changed, 183 insertions(+), 0 deletions(-)

  git pull ssh:// refs/changes/40/5840/3
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6d43f5bb9811e728ad592933066d006c8fb4553a
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Sailesh Mukil <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>

View raw message