amoro icon indicating copy to clipboard operation
amoro copied to clipboard

[AMORO-3554] Clear orphan table information during table service initializing

Open Jzjsnow opened this issue 7 months ago • 2 comments

Why are the changes needed?

With the growth of system runtime or abnormal interruptions during the processes of table synchronizing and disposing, the metadata of orphan TableRuntimes/TableIdentifier(i.e. tableRuntime/tableIdentifier that is no longer associated with any valid tableIdentifier/tableRuntime) may accumulate in the database and block further table synchronizing and disposing.

Close #3554.

Brief change log

  • Identify and remove tableRuntime metadata that is no longer associated with any valid tableIdentifier
  • Identify and remove tableIdentifier metadata that is no longer associated with any valid tableRuntime
  • clear the optimization Process, taskRuntime and optimizationQuota which are related to these invalid tables.

method

How was this patch tested?

  • [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • [ ] Add screenshots for manual tests if appropriate

  • [x] 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)

Jzjsnow avatar May 11 '25 16:05 Jzjsnow

I read that the implementation is to clean up expired table meta information before the table service is initialised. Is this a requirement to manually restart AMS when an exception is found?

Aireed avatar May 21 '25 07:05 Aireed

I read that the implementation is to clean up expired table meta information before the table service is initialised. Is this a requirement to manually restart AMS when an exception is found?

If an exception is thrown during the cleanup process, AMS will automatically restart repeatedly until it is manually stopped. This is due to the restart logic handled by AmoroServiceContainer.

In the latest commit, I’ve made the cleanup logic configurable via the AMS configuration file. By default, the cleanup is disabled, and users can choose to enable it as needed.

Feel free to check out the latest changes and let me know if you have further questions or suggestions!

Jzjsnow avatar Jun 05 '25 12:06 Jzjsnow

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jul 15 '25 00:07 github-actions[bot]

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Aug 21 '25 00:08 github-actions[bot]

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

github-actions[bot] avatar Aug 28 '25 00:08 github-actions[bot]