-
Notifications
You must be signed in to change notification settings - Fork 637
fix: crash when deleting sketches with shared timelines/indices #3677
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: master
Are you sure you want to change the base?
Conversation
|
/gemini 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.
Code Review
This pull request addresses a critical crash that occurs when deleting a sketch with timelines that share the same search index. The fix involves iterating over a copy of the timelines to prevent modification-during-iteration errors and adds necessary checks to handle cases where timelines or their search indices might have already been deleted due to cascading database operations. The approach is sound and effectively resolves the reported issue. I've suggested a minor refactoring to combine two conditional checks, which will improve code conciseness and readability.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
|
/gemini review |
This PR fixes a critical crash (sqlalchemy.exc.InvalidRequestError) that occurs when force-deleting a
sketch that contains multiple timelines sharing the same underlying search index.