-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[BugFix] remove load job after db had been dropped #67254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
Signed-off-by: luohaha <[email protected]>
c1b34e7 to
32dbf7c
Compare
|
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 11 / 11 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!



Why I'm doing:
After dropping the database, the load jobs in the Load Manager were not cleared. This causes the system to frequently print error logs when querying the system table
loads:What I'm doing:
This pull request introduces a new mechanism to clean up load jobs associated with a database when the database is erased. The main changes add a method to remove all load jobs for a given database, integrate it into the database deletion workflow, and provide comprehensive unit tests for this functionality.
Load Job Cleanup Improvements:
removeLoadJobsByDb(long dbId)method to theLoadMgrclass to remove all load jobs belonging to a specified database, ensuring proper locking and cleanup.LocalMetastore.onEraseDatabase(long dbId)method to callremoveLoadJobsByDb, so that all load jobs are removed when a database is erased.Testing Enhancements:
testRemoveLoadJobsByDbinLoadMgrTest.javato verify that load jobs are correctly removed for a given database, including checks for multiple databases and job states.What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Note
Ensures load jobs tied to a database are purged when the database is erased.
LoadMgr.removeLoadJobsByDb(long dbId)to remove all jobs for a DB under write lock usingunprotectedRemoveJobReleatedMetaLocalMetastore.onEraseDatabaseafter removing the DB transaction managerLoadMgrTest.testRemoveLoadJobsByDbto verify per-DB job removal and internal map cleanupWritten by Cursor Bugbot for commit 32dbf7c. This will update automatically on new commits. Configure here.