Reset the force-deleting flag when a force delete throws - #242
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Walkthrough
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change ensures the force-delete flag is reset even when deletion throws, while preserving the exception for callers. No actionable merge-blocking risk remains beyond normal test checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
f095bdb to
a31e46b
Compare
|
@austinderrick if you retarget develop I'll merge this in before I release 1.2.14 later this evening or this weekend. |
If delete() throws, forceDelete() left the datasource stuck in force-deleting mode, so every later ordinary delete on that instance ran as a hard delete. The flag now resets in a finally block and the exception propagates.
a31e46b to
7aca6c4
Compare
|
@LukeTowers : Updated! |
If
delete()throws insideforceDelete(), the flag never resets and the datasource is stuck in force-delete mode. Every ordinary delete after that runs as a hard delete.The fix wraps the call in try/finally so the flag always resets and the exception still reaches the caller. Two tests cover the throwing path and the happy path.
Summary by CodeRabbit
Bug Fixes
Tests