Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19949 )
Change subject: KUDU-3483 Fix flushing data in batch when table schema changed ...................................................................... KUDU-3483 Fix flushing data in batch when table schema changed In auto_flush_background or manual_flush mode, applying an operation firstly inserts the row into the buffer. When the buffer is full or function flush() is called, it tries to flush multiple rows into Kudu server. Firstly, it groups this data according to the tablet id as a batch. A batch may contains multiple rows which belong to the same tablet. Then a batch will encode into bytes. At this time, it reads the table schema of the first row and decides the format of the data. If two rows have different schema but belongs to the same tablet, which maybe because of altering the table between inserting two rows, it causes array index outof index bound exception. This patch will validate the schema of multiple rows which belong to the same tablet. If the schema is different, it puts them into the different groups as different batches. Change-Id: Ie6501962b32814d121f180b2942999c402d927db Reviewed-on: http://gerrit.cloudera.org:8080/19949 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <ale...@apache.org> --- M java/kudu-client/src/main/java/org/apache/kudu/Schema.java M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java A java/kudu-client/src/test/java/org/TestSchema.java M java/kudu-client/src/test/java/org/apache/kudu/client/TestAlterTable.java 4 files changed, 366 insertions(+), 19 deletions(-) Approvals: Kudu Jenkins: Verified Alexey Serbin: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/19949 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie6501962b32814d121f180b2942999c402d927db Gerrit-Change-Number: 19949 Gerrit-PatchSet: 22 Gerrit-Owner: Wang Xixu <1450306...@qq.com> Gerrit-Reviewer: Alexey Serbin <ale...@apache.org> Gerrit-Reviewer: Attila Bukor <abu...@apache.org> Gerrit-Reviewer: KeDeng <kdeng...@gmail.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Wang Xixu <1450306...@qq.com> Gerrit-Reviewer: Yifan Zhang <chinazhangyi...@163.com> Gerrit-Reviewer: Yingchun Lai <laiyingc...@apache.org> Gerrit-Reviewer: Yuqi Du <shenxingwuy...@gmail.com>