fix: Handle deletions in the tables - #15
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Mnesia↔RocksDB table sync receiver logic to ensure the local RocksDB-backed table correctly reflects upstream deletions by clearing the receiver’s table before applying incoming sync data.
Changes:
- Clear the receiver table once at the beginning of a table sync (and also when the upstream table is empty) so missing records are removed locally.
- Track receiver-side sync state via a new
need_clearstate to ensure clearing happens exactly once. - Update the file header copyright notice formatting.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
d5fa1d4 to
c5763f8
Compare
c5763f8 to
6600bcd
Compare
|
BTW, if you are using mnesia_rocksdb together with Distributed Mnesia, you might be interested in discussing how to evolve https://git.qpq.swiss/QPQ-AG/mnesia_rocksdb/pulls/12 - When using the rocksdb backend for very large tables, it is probably more efficient to use the rocksdb backup support, but the PR currently doesn't consider distributed databases. (That fork of |
|
Thanks @uwiger, I'll keep an eye on that project. But we practically don't use mnesia+rocksdb. Most of our remaining mnesia/mria tables are ram_copies; as for large volumes of persistent data we've already built something else from scratch. |
No description provided.