You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by "Jzjsnow (via GitHub)" <gi...@apache.org> on 2025/02/26 07:04:17 UTC
[PR] [AMORO-3413] Optimize execution order when disposing tables [amoro]
Jzjsnow opened a new pull request, #3447:
URL: https://github.com/apache/amoro/pull/3447
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://amoro.apache.org/how-to-contribute/
2. If the PR is related to an issue in https://github.com/apache/amoro/issues, add '[AMORO-XXXX]' in your PR title, e.g., '[AMORO-XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][AMORO-XXXX] Your PR title ...'.
-->
## Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about its use case.
2. If you fix a bug, you can clarify why it is a bug.
3. Use Fix/Resolve/Close #{ISSUE_NUMBER} to link this PR to its related issue
-->
Currently, when adding and deleting tables from external catalogs, the `tableIdentifier` is added/deleted first and then the `tableRuntime` is added/deleted sequentially, this may result in a scenario where tableIdentifier deletion succeeds but tableRuntime deletion fails, and the following problems further occur:
1. The web page displaying tableRuntime list for the specific catalog fails, because these tableRuntimes can not find the corresponding information in the table_identifier table;
2. tableRuntime retained in the persistence will block the re-insertion of the table, due to the unique key conflicts.
Close #3413.
## Brief change log
<!--
Clearly describe the changes made in modules, classes, methods, etc.
-->
- When calling `disposeTable()` to dispose of a table, we first remove the tableRuntime before removing the tableIdentifier. This follows the reverse process of the `syncTable()` method, where we first add the tableIdentifier and then add the tableRuntime.
- When calling`dispose()` to dispose of a tableRuntime instance, we first unregistry metrics, then close the optimizing processes and remove the tableRuntime from persistence.
## How was this patch tested?
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] Run test locally before making a pull request
## Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AMORO-3413] Optimize execution order when disposing tables [amoro]
Posted by "zhoujinsong (via GitHub)" <gi...@apache.org>.
zhoujinsong commented on PR #3447:
URL: https://github.com/apache/amoro/pull/3447#issuecomment-2689982097
@Jzjsnow Thanks for the work!
I have a different perspective on this issue. Wouldn't it be a better approach to delete the runtime table and the identifier table together through transaction control during the dispose phase?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AMORO-3413] Optimize execution order when disposing tables [amoro]
Posted by "zhoujinsong (via GitHub)" <gi...@apache.org>.
zhoujinsong merged PR #3447:
URL: https://github.com/apache/amoro/pull/3447
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AMORO-3413] Optimize execution order when disposing tables [amoro]
Posted by "zhoujinsong (via GitHub)" <gi...@apache.org>.
zhoujinsong commented on PR #3447:
URL: https://github.com/apache/amoro/pull/3447#issuecomment-2684142758
Thanks for the fix, this PR may resolve #3444 too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org