Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21665 )

Change subject: IMPALA-12865: Fix wrong lastRefreshEventId set by firing RELOAD 
events
......................................................................


Patch Set 26:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21665/22/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
File fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java:

http://gerrit.cloudera.org:8080/#/c/21665/22/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@7573
PS22, Line 7573:
> We don't have to change the updatePartition() method (previously, I thought
If the partition is not updated (due to lastRefreshEventId not changed), we can 
add the in-flight version to the partition directly after the if-branch. 
Replied more details in PS26.


http://gerrit.cloudera.org:8080/#/c/21665/26/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
File fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java:

http://gerrit.cloudera.org:8080/#/c/21665/26/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@7569
PS26, Line 7569:             partBuilder.addToVersionsForInflightEvents(false, 
newCatalogVersion);
This just adds the version to the inflight list of HdfsPartition$Builder. We 
will lose it if HdfsTable.updatePartition() returns false which means 
HdfsPartition$Builder.build() is not invoked and the new HdfsPartition instance 
is not created.

Note that both HdfsPartition and HdfsPartition$Builder have an inflight event 
list and they are different instances. Modify the list in the Builder won't 
modify the list in the old HdfsPartition instance.

I think we should remove this line and modify the partition instance after the 
if-branch instead. I.e.

            partBuilder.setLastRefreshEventId(currentHMSEventId);
            if (hdfsTbl.updatePartition(partBuilder)) {
              partitionChanged = true;
              partition = hdfsTbl.getPartitionFromThriftPartitionSpec(
                  partSpecList.get(i));
              Preconditions.checkNotNull(partition, "Partition is null after 
update");
            }
            partition.addToVersionsForInflightEvents(false, newCatalogVersion);



--
To view, visit http://gerrit.cloudera.org:8080/21665
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90039da77ec561c5aede44456f88c6650582815b
Gerrit-Change-Number: 21665
Gerrit-PatchSet: 26
Gerrit-Owner: Sai Hemanth Gantasala <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Pranav Lodha <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Sai Hemanth Gantasala <[email protected]>
Gerrit-Comment-Date: Thu, 15 Jan 2026 01:28:05 +0000
Gerrit-HasComments: Yes

Reply via email to