Jzjsnow opened a new pull request, #3520:
URL: https://github.com/apache/amoro/pull/3520
<!--
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?
Currently the primary keys of the tables `table_optimizing_process`,
`task_runtime`, and `optimizing_task_quota` contain only `process_id` and not
`table_id`, where `process_id` is created by the current timestamp, e.g.
1744702084683. When multiple tables are optimized concurrently, it is easy to
have the same `process_id` at the same trigger time, resulting in a primary key
duplication exception `org.apache.ibatis.exceptions.PersistenceException`
during persistence.
Close #3252.
## Brief change log
<!--
Clearly describe the changes made in modules, classes, methods, etc.
-->
- Add table_id to the primary keys of `table_optimizing_process`,
`task_runtime`, and `optimizing_task_quota` respectively.
## 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]