Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17486 )
Change subject: KUDU-3277 fix concurrent session flush issue in Java client ...................................................................... KUDU-3277 fix concurrent session flush issue in Java client This patch fixes the issue reported by KUDU-3277. The bug manifested itself in rare cases when a session running in the AUTO_FLUSH_BACKGROUND mode was either being flushed explicitly or implicitly (i.e. upon closing the session) while the AUTO_FLUSH_BACKGROUND session's logic was flushing its data buffers concurrently as well. This patch also adds a reproduction scenario for KUDU-3277. The newly introduced test scenario was reliably failing before the fix: * 'java.lang.AssertionError: This Deferred was already called' messages were encountered in the log multiple times with the stack exactly as described in KUDU-3277 * some flusher threads were unable to join since KuduSession.flush() would hang (i.e. would not return) Change-Id: If6aaccc06abf1a2673620ab7c649f51f91999ad9 Reviewed-on: http://gerrit.cloudera.org:8080/17486 Tested-by: Alexey Serbin <aser...@cloudera.com> Reviewed-by: Grant Henke <granthe...@apache.org> --- M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java 2 files changed, 170 insertions(+), 8 deletions(-) Approvals: Alexey Serbin: Verified Grant Henke: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/17486 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If6aaccc06abf1a2673620ab7c649f51f91999ad9 Gerrit-Change-Number: 17486 Gerrit-PatchSet: 3 Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Bankim Bhavsar <ban...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120)