Backport "reader check" changes from Damus iOS#128
Conversation
Changelog-Changed: Clear stale LMDB readers on NostrDB init to prevent reader slot leakage and runaway storage usage Signed-off-by: Daniel D'Aquino <daniel@daquino.me>
|
CC @jb55, please let me know if you have any concerns. Thanks! |
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds startup-time detection and cleanup of stale LMDB reader slots. A new helper function ( ChangesLMDB Reader Slot Initialization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
jb55
left a comment
There was a problem hiding this comment.
thanks! lgtm. strfry also has this, i didn't realize how important it was.
This backports the following commit from the Damus iOS repo: damus-io/damus@fe482a9
The rationale of this change is to reduce the chance of stale reader slots by following this recommendation from
lmdb.hdocs:Summary by CodeRabbit