You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Michael Smith (Code Review)" <ge...@cloudera.org> on 2025/04/23 22:59:47 UTC
[Impala-ASF-CR] IMPALA-13631: (Addendum) Refresh table after rename
Michael Smith has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22807
Change subject: IMPALA-13631: (Addendum) Refresh table after rename
......................................................................
IMPALA-13631: (Addendum) Refresh table after rename
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have and fetch the
new table definition with invalidateTable to continue, automating most
of the work that the error message suggested users do via 'invalidate
metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Also manually tested this behavior
using a debug_action after the alter_table RPC and parallel invalidate
metadata.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
2 files changed, 27 insertions(+), 34 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/22807/1
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 8:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/7/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/22807/7/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5759
PS7, Line 5759: if (result.second == null) {
> Can we add a warning if version <= 0? E.g. "Deletion update on the old tabl
Would running invalidate metadata on that table fix it?
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Apr 2025 19:59:41 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 9: Code-Review+2
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/9/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/22807/9/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5747
PS9, Line 5747: // The HMS alter_table event has already been picked up by an invalidate, in which
nit: still a bit confusing that HMS ALTER_TABLE event is not always related to this issue. The issue still exists when event-processor is disabled. I think we can simply say "The old table object has been removed by a concurrent operation, e.g. INVALIDATE METADATA <table>. Fetch the latest delete from deleteLog."
Note that there are other possible operations that could cause this, e.g. implicit invalidate from CatalogdTableInvalidator, processing DROP_TABLE event.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 29 Apr 2025 00:05:37 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Daniel Becker, Joe McDonnell, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22807
to look at the new patch set (#10).
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
IMPALA-13989: Invalidate table on rename failure
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have - updated from
the delete log if possible - and fetch the new table definition with
invalidateTable to continue, automating most of the work that the error
message suggested users do via 'invalidate metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Adds concurrency tests with
simultaneous rename and invalidate metadata that previously would fail.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
A tests/custom_cluster/test_concurrent_rename.py
3 files changed, 116 insertions(+), 35 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/22807/10
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 10
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 11: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 11
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 29 Apr 2025 06:24:20 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Daniel Becker (Code Review)" <ge...@cloudera.org>.
Daniel Becker has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 25 Apr 2025 09:14:18 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Daniel Becker, Joe McDonnell, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22807
to look at the new patch set (#5).
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
IMPALA-13989: Refresh table after rename
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have and fetch the
new table definition with invalidateTable to continue, automating most
of the work that the error message suggested users do via 'invalidate
metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Also manually tested this behavior
using a debug_action after the alter_table RPC and parallel invalidate
metadata.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
2 files changed, 30 insertions(+), 34 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/22807/5
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 9:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/19041/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Apr 2025 21:41:32 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 10: Code-Review+2
Carry +2 for comment update.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 10
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 29 Apr 2025 00:08:40 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/4/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/22807/4/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5762
PS4, Line 5762: The new ta
> nit: This sounds better
Done
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 18:16:23 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Daniel Becker (Code Review)" <ge...@cloudera.org>.
Daniel Becker has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 3:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/22807/3/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/22807/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5755
PS3, Line 5755: second
Nit: wouldn't something like 'newTblCatObject' easier to understand?
http://gerrit.cloudera.org:8080/#/c/22807/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5765
PS3, Line 5765: } else {
We could add a precondition check that 'result.first' is not NULL if 'result.second' is not NULL.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 14:47:54 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 18:42:26 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Daniel Becker, Joe McDonnell, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22807
to look at the new patch set (#7).
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
IMPALA-13989: Invalidate table on rename failure
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have - updated from
the delete log if possible - and fetch the new table definition with
invalidateTable to continue, automating most of the work that the error
message suggested users do via 'invalidate metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Adds concurrency tests with
simultaneous rename and invalidate metadata that previously would fail.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
A tests/custom_cluster/test_concurrent_rename.py
3 files changed, 102 insertions(+), 35 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/22807/7
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/11781/ DRY_RUN=true
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 19:40:23 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
IMPALA-13989: Invalidate table on rename failure
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have - updated from
the delete log if possible - and fetch the new table definition with
invalidateTable to continue, automating most of the work that the error
message suggested users do via 'invalidate metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Adds concurrency tests with
simultaneous rename and invalidate metadata that previously would fail.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Reviewed-on: http://gerrit.cloudera.org:8080/22807
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
A tests/custom_cluster/test_concurrent_rename.py
3 files changed, 116 insertions(+), 35 deletions(-)
Approvals:
Impala Public Jenkins: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 12
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 9:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG@22
PS5, Line 22: Adds concurrency tests with
: simultaneous rename and invalidate metadata that previously would fail.
:
> Using INVALIDATE METADATA <table> on the old table name might be easlier si
Done
http://gerrit.cloudera.org:8080/#/c/22807/7/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/22807/7/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5752
PS7, Line 5752: (version > 0) {
> nit: This is just one possibility. A concurrent INVALIDATE <table> could al
Done
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Apr 2025 21:15:15 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/18987/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 23 Apr 2025 23:26:19 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 2:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5747
PS2, Line 5747: updated
nit: updated (successfully removed)
http://gerrit.cloudera.org:8080/#/c/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5753
PS2, Line 5753: response.result.addToRemoved_catalog_objects(wantMinimalResult ?
: oldTbl.toInvalidationObject() : oldTbl.toMinimalTCatalogObject());
Move this below, after L5772?
http://gerrit.cloudera.org:8080/#/c/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5763
PS2, Line 5763: tableName
newTableName?
What is the possible scenario that can lead here? RENAME run concurrently against DROP/INVALIDATE specific table?
ALTER TABLE RENAME tbl TO tbl_2;
DROP TABLE tbl_2;
INVALIDATE METADATA tbl_2;
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 00:22:57 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG@7
PS5, Line 7: Refresh table after rename
nit: maybe talk about invalidate for failures? E.g. "Invalidate tables to handle RENAME failures"
http://gerrit.cloudera.org:8080/#/c/22807/5/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/22807/5/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5753
PS5, Line 5753: }
> Can we add a warning when result.first == null? It seems a trouble using th
I think we can find the removed table object in catalog_.getDeleteLog().
With the patch of https://gerrit.cloudera.org/c/22816/, the deleteLog GC won't happen frequently so in most cases we can find the table there.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 25 Apr 2025 03:15:54 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 6:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/19022/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 25 Apr 2025 23:41:44 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 11: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 11
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 29 Apr 2025 00:09:02 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 11:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/11804/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 11
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 29 Apr 2025 00:09:03 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 25 Apr 2025 01:54:40 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 10:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/19042/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 10
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 29 Apr 2025 00:34:57 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 9:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/5/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/22807/5/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5762
PS5, Line 5762: }
> I've triggered this a handful of times, but not able to get a reliable repr
Managed to get this working. The test override to reduce statestore update interval was messing with my reproduction.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Apr 2025 21:15:54 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Joe McDonnell, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22807
to look at the new patch set (#2).
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
IMPALA-13989: Refresh table after rename
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have and fetch the
new table definition with invalidateTable to continue, automating most
of the work that the error message suggested users do via 'invalidate
metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Also manually tested this behavior
using a debug_action after the alter_table RPC and parallel invalidate
metadata.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
2 files changed, 27 insertions(+), 34 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/22807/2
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 3:
(6 comments)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> We are holding the table lock of the old table here. Ideally the table lock
I don't think holding versionLock_ throughout renameTable/invalidateTable helps. The main issue that affects us is when something happens between alter_table completing in HMS and running catalog_.renameTable. If something happens after renameTable, we have two cases
- renameTable succeeded, so whatever happens after doesn't matter.
- renameTable fails because something also happened before renameTable. We still have to handle the possibility that invalidateTable fails, because the table could have been renamed and then destination deleted before renameTable executes.
A higher level lock could reduce the possibility of that occurring, but we would need IMPALA-13850 and some other work to be sure, and that seems outside the scope of this fix.
http://gerrit.cloudera.org:8080/#/c/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5747
PS2, Line 5747: updated
> nit: updated (successfully removed)
Done
http://gerrit.cloudera.org:8080/#/c/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5753
PS2, Line 5753: response.result.addToRemoved_catalog_objects(wantMinimalResult ?
: oldTbl.toInvalidationObject() : oldTbl.toMinimalTCatalogObject());
> I don't think it matters, but I can do that.
Done
http://gerrit.cloudera.org:8080/#/c/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5763
PS2, Line 5763: tableName
> Yes, that's what I was imagining. I didn't specifically reproduce that issu
Done
http://gerrit.cloudera.org:8080/#/c/22807/3/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/22807/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5755
PS3, Line 5755: second
> Nit: wouldn't something like 'newTblCatObject' easier to understand?
Done
http://gerrit.cloudera.org:8080/#/c/22807/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5765
PS3, Line 5765: } else {
> We could add a precondition check that 'result.first' is not NULL if 'resul
Done
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 17:11:04 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 7:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/19024/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Sat, 26 Apr 2025 00:01:17 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Daniel Becker, Joe McDonnell, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22807
to look at the new patch set (#4).
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
IMPALA-13989: Refresh table after rename
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have and fetch the
new table definition with invalidateTable to continue, automating most
of the work that the error message suggested users do via 'invalidate
metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Also manually tested this behavior
using a debug_action after the alter_table RPC and parallel invalidate
metadata.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
2 files changed, 29 insertions(+), 34 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/22807/4
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 4:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/18995/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 17:37:31 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 7:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG@22
PS5, Line 22: Adds concurrency tests with
: simultaneous rename and invalidate metadata that previously would fail.
:
> It happened pretty regularly in test_concurrent_ddls. I'm working on making
Using INVALIDATE METADATA <table> on the old table name might be easlier since it's faster than gloabl INVALIDATE METADATA.
http://gerrit.cloudera.org:8080/#/c/22807/7/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/22807/7/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5752
PS7, Line 5752: The HMS alter_table event has already been picked up by a global invalidate
nit: This is just one possibility. A concurrent INVALIDATE <table> could also lead to this.
http://gerrit.cloudera.org:8080/#/c/22807/7/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5759
PS7, Line 5759: }
Can we add a warning if version <= 0? E.g. "Deletion update on the old table {} not found. Impalad might still have its metadata until the deletion update arrives from statestore."
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Sat, 26 Apr 2025 09:58:24 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 9:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/7/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/22807/7/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5759
PS7, Line 5759: } else {
> Would running invalidate metadata on that table fix it?
Done
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Apr 2025 22:13:20 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> We take versionLock_.writeLock().lock() inside renameTable. This can happen
No, I mean holding early here to so that nothing compete with this method between catalog_.renameTable() and possible catalog_.invalidateTable() call later.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 00:37:39 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> Can we consider taking versionLock_.writeLock().lock() just before catalog_
We take versionLock_.writeLock().lock() inside renameTable. This can happen because of the gap between HMS finishing the alter_table RPC and taking versionLock_; we don't want to hold it during the RPC so it's an inevitable gap.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 00:31:43 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> An alternative is that we could log the behavior and return, but the response would be incomplete. I'm not really clear what's done with the response.
The DDL responses are used by the coordinator to apply the catalog changes immediately instead of waiting for statestore updates. If we don't return the response correctly, coordinator might still have the old table or doesn't know the existence of the new table. Note that the concurrent INVALIDATE <table> could come from another coordinator. So the coordinator that submits the RENAME will see stale metadata until the statestore update arrives.
Legacy catalog mode coordinator applies the response here:
https://github.com/apache/impala/blob/b410a90b4707be2e08dcb6c02b9473aa9ade8d96/fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java#L206
Local catalog mode coordinator applies the response here:
https://github.com/apache/impala/blob/4ddacac14f03b4713aa6a9a0da2c3a45ffe03715/fe/src/main/java/org/apache/impala/catalog/local/CatalogdMetaProvider.java#L1399
Backend code that invokes these:
https://github.com/apache/impala/blob/0ed4e869de43532c72dab514850944c3a6036bd1/be/src/service/impala-server.cc#L2439
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 05:51:38 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/5/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/22807/5/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5753
PS5, Line 5753: }
> I think we can find the removed table object in catalog_.getDeleteLog().
Which version should we fetch? Is the latest delete for that table safe?
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 25 Apr 2025 20:58:09 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 6:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG@7
PS5, Line 7: Invalidate table on rename
> nit: maybe talk about invalidate for failures? E.g. "Invalidate tables to h
Done
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG@22
PS5, Line 22: Also manually tested this behavior
: using a debug_action after the alter_table RPC and parallel invalidate
: metadata.
> It worths adding a test for this. We can disable HMS event processing to si
It happened pretty regularly in test_concurrent_ddls. I'm working on making a reliable standalone test, but haven't quite worked out the right sequence to trigger it consistently.
http://gerrit.cloudera.org:8080/#/c/22807/5/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/22807/5/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5753
PS5, Line 5753: // which case the Table no longer exists. Fetch the latest delete from deleteLog.
> Which version should we fetch? Is the latest delete for that table safe?
Done
http://gerrit.cloudera.org:8080/#/c/22807/5/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5762
PS5, Line 5762: result.first.toInvalidationObject() : result.first.toMinimalTCatalogObject();
> String.format() uses "%s", "%d" etc. instead of "{}"
I've triggered this a handful of times, but not able to get a reliable reproduction.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 25 Apr 2025 23:15:34 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Daniel Becker, Joe McDonnell, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22807
to look at the new patch set (#9).
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
IMPALA-13989: Invalidate table on rename failure
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have - updated from
the delete log if possible - and fetch the new table definition with
invalidateTable to continue, automating most of the work that the error
message suggested users do via 'invalidate metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Adds concurrency tests with
simultaneous rename and invalidate metadata that previously would fail.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
A tests/custom_cluster/test_concurrent_rename.py
3 files changed, 116 insertions(+), 35 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/22807/9
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
Patch Set 10:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/9/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/22807/9/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5747
PS9, Line 5747: // The old table object has been removed by a concurrent operation, e.g. INVALIDATE
> nit: still a bit confusing that HMS ALTER_TABLE event is not always related
Works for me. I'd been thinking about that but hadn't finished the thought.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 10
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 29 Apr 2025 00:08:18 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> Can we consider taking versionLock_.writeLock().lock() just before catalog_
I mean catalog_.getLock().writeLock().lock().
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 00:31:35 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 3:
Build Failed
https://jenkins.impala.io/job/gerrit-code-review-checks/18988/ : Initial code review checks failed. See linked job for details on the failure.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 04:32:21 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> > An alternative is that we could log the behavior and return, but the resp
We are holding the table lock of the old table here. Ideally the table lock should protect the RENAME from concurrent INVALIDATE <table> on the old table. However, the lock is just a field belongs to the table object which could be stale (removed from the cache) and can only protect in-place modifications on that table object. INVALIDATE <table> doesn't modify the table object in-place so it doesn't respect this lock. Instead, it modifies the link from the catalog cache (the db to be specific) to the table object and points to a new IncompleteTable object.
catalogVersion lock can be used to protect such "link" modifications. So we see this issue after not holding it in IMPALA-13631. I think one solution is lifting the table lock to a higher level outside the table object. So it keeps unique even when INVALIDATE <table> modifies the link (i.e. replaces the table object). Currently, tableCache_ of a Db is a ConcurrentHashMap from String to Table. We can change the value type to be a pair of <ReentrantReadWriteLock, Table>. The first item is the table lock. All table operations including INVALIDATE <table> should acquire that lock.
However, the links from the catalog cache to the dbs (dbCache_) could still be modified concurrently. A lock on dbCache_ will be another global lock like catalogVersion lock that we want to avoid. We might need to lift the db lock in the same way.
Finally, global INVALIDATE could replace the whole dbCache_. This is going to be changed by https://gerrit.cloudera.org/c/22640/.
So we might be good.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 06:04:32 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Invalidate table on rename failure
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Daniel Becker, Joe McDonnell, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22807
to look at the new patch set (#6).
Change subject: IMPALA-13989: Invalidate table on rename failure
......................................................................
IMPALA-13989: Invalidate table on rename failure
Handles the error "Table/view rename succeeded in the Hive Metastore,
but failed in Impala's Catalog Server" rather than failing the table
rename. This error happens when catalog state catches up to the alter
event from our alter_table RPC to HMS before we renameTable explicitly
in the catalog. The catalog can update independently due to a concurrent
'invalidate metadata' call.
In that case we use the oldTbl definition we already have - updated from
the delete log if possible - and fetch the new table definition with
invalidateTable to continue, automating most of the work that the error
message suggested users do via 'invalidate metadata <tbl>'.
Updated the test_concurrent_ddls test to remove handle_rename_failure
and ran the tests a dozen times. Also manually tested this behavior
using a debug_action after the alter_table RPC and parallel invalidate
metadata.
Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_concurrent_ddls.py
2 files changed, 35 insertions(+), 35 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/22807/6
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/5/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/22807/5/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5762
PS5, Line 5762: "The new table/view {} was concurrently removed during rename.",
I haven't found a way to trigger this exception yet. So it remains theoretical.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 18:40:33 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/22807/5//COMMIT_MSG@22
PS5, Line 22: Also manually tested this behavior
: using a debug_action after the alter_table RPC and parallel invalidate
: metadata.
It worths adding a test for this. We can disable HMS event processing to simplify the test. The concurrent processing of ALTER_TABLE event of the RENAME makes the issue more complex.
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> Ack
Ack
http://gerrit.cloudera.org:8080/#/c/22807/5/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/22807/5/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5753
PS5, Line 5753: }
Can we add a warning when result.first == null? It seems a trouble using the original version of oldTbl in the deletion. In catalog_.removeTable(), we assign a new catalog version to the removed object:
https://github.com/apache/impala/blob/fb789df3be7cfbbae519248de6437aa87bad0963/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java#L2698
http://gerrit.cloudera.org:8080/#/c/22807/5/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5762
PS5, Line 5762: "The new table/view {} was concurrently removed during rename.",
> I haven't found a way to trigger this exception yet. So it remains theoreti
String.format() uses "%s", "%d" etc. instead of "{}"
It's easier to trigger this with HMS event processing disabled.
bin/start-impala-cluster.py --catalogd_args=--hms_event_polling_interval_s=0
Then use 3 clients:
client1: alter table tbl rename to tbl_tmp;
client2: invalidate metadata tbl;
client3: invalidate metadata tbl_tmp; drop table tbl_tmp;
Suspend the alterRename thread only in IntelliJ and let the dropTable finish. Then resume the thread and we will hit this.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 25 Apr 2025 01:28:40 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 5:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/18996/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 18:42:56 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 2:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5753
PS2, Line 5753: response.result.addToRemoved_catalog_objects(wantMinimalResult ?
: oldTbl.toInvalidationObject() : oldTbl.toMinimalTCatalogObject());
> Move this below, after L5772?
I don't think it matters, but I can do that.
http://gerrit.cloudera.org:8080/#/c/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5763
PS2, Line 5763: tableName
> newTableName?
Yes, that's what I was imagining. I didn't specifically reproduce that issue, but
ALTER TABLE RENAME tbl TO tbl_2;
between alter_table RPC and catalog_.renameTable, run
INVALIDATE METADATA tbl_2; # pickup that the table was altered
DROP TABLE tbl_2; # delete the table
Invalidate ensures that renameTable returns (null, null), while DROP ensures that catalog_.invalidateTable returns null.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 00:26:28 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
Can we consider taking versionLock_.writeLock().lock() just before catalog_.renameTable?
versionLock_ is reentrant. Holding it will avoid concurrent operation against catalog cache.
The remaining operation from this point should be fast enough to justify holding the write lock until the end of method.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 00:29:23 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> No, I mean holding early here to so that nothing compete with this method b
Oh, so that we don't have to throw an ImpalaRuntimeException? I'll think about it. An alternative is that we could log the behavior and return, but the response would be incomplete. I'm not really clear what's done with the response.
The alter would have been successful, but no longer relevant.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 02:43:39 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> No, I mean holding early here to so that nothing compete with this method between catalog_.renameTable() and possible catalog_.invalidateTable() call later.
Ideally we should hold the catalogVersion lock at the time when RENAME in HMS is done. But between it's done in HMS side and HMS responds to this alter_table RPC, the concurrent INVALIDATE <table> could find the old table doesn't exist in HMS (assuming get_table is pretty fast) and then removes the old table from catalog. So it seems not enough to solve the issue.
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 04:15:18 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13989: Refresh table after rename
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22807 )
Change subject: IMPALA-13989: Refresh table after rename
......................................................................
Patch Set 4: Code-Review+1
(2 comments)
http://gerrit.cloudera.org:8080/#/c/22807/2/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/22807/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5736
PS2, Line 5736: Pair<Table, Table> result =
: catalog_.renameTable(tableName.toThrift(), newTableName.toThrift());
> I don't think holding versionLock_ throughout renameTable/invalidateTable h
Ack
http://gerrit.cloudera.org:8080/#/c/22807/4/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/22807/4/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@5762
PS4, Line 5762: Table/view
nit: This sounds better
"The new table/view {} was concurrently removed during rename."
--
To view, visit http://gerrit.cloudera.org:8080/22807
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2a276b6e5ceb35b7f3ce788cc47052387ae8980
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 24 Apr 2025 17:40:49 +0000
Gerrit-HasComments: Yes