Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19036
Change subject: IMPALA-11508: Deflake test_expire_snapshots ...................................................................... IMPALA-11508: Deflake test_expire_snapshots Before this patch test_expire_snapshots failed frequently. The patch is only a few lines of code, but there are some subtleties here: IcebergCatalogOpExecutor.alterTableExecute() didn't use Iceberg transactions to carry out the operation. This means that expireSnapshots() resulted in an ALTER TABLE operation on its own which we also got during event processing. Because this ALTER TABLE event didn't had the catalog version set we didn't recognized it as a self-event. This caused unnecessary table reloads during the tests which manifested in InconsistentMetadataFetchException: "... table ... changed version between accesses" errors. With this patch IcebergCatalogOpExecutor.alterTableExecute() takes an Iceberg transaction object and invokes expireSnapshots() in the context of this Iceberg transaction. This Iceberg transaction also sets table properties "impala.events.catalogServiceId" and "impala.events.catalogVersion". And because everything happens in a single Iceberg transaction we only create a single ALTER TABLE which we can recognize during event processing (based on the table properties), avoiding unnecessary table reloads. Testing: * executed test_expire_snapshots in a loop Change-Id: I6d82c8b52466a24af096fe5fe4dbd034a1ee6a15 --- M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java M fe/src/main/java/org/apache/impala/service/IcebergCatalogOpExecutor.java 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/36/19036/1 -- To view, visit http://gerrit.cloudera.org:8080/19036 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6d82c8b52466a24af096fe5fe4dbd034a1ee6a15 Gerrit-Change-Number: 19036 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <borokna...@cloudera.com>