fix(powersync): Don't flush records when diff trigger isn't setup yet when using on-demand mode.#1585
fix(powersync): Don't flush records when diff trigger isn't setup yet when using on-demand mode.#1585Chriztiaan wants to merge 6 commits into
on-demand mode.#1585Conversation
Update main
Update From Upstream
chore: Update from upstream
…t. This fixes a non-critical error that was logged on startup.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds defensive null checks to prevent flushing and disposing a diff trigger that hasn't been created yet during on-demand sync initialization, eliminating non-critical errors logged at startup in the ChangesDiff trigger initialization safety
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
🎯 Changes
Users reported an error that occurs during startup when using
on-demand:An error has been detected in the sync handler Error: no such table: __XXXX_tracking_6bed0e00. During initialisation we were flushing records before the diff trigger was setup.This change simply skips flushing if the diff trigger hasn't been setup yet.
✅ Checklist
pnpm test.🚀 Release Impact
Summary by CodeRabbit