feat!: make read_only_data_batch truly const - #192
dhruv9vats wants to merge 5 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
The failing test is a flaky one, because:
So disabling the test for now. |
|
These changes basically lay the groundwork for sirius-db/sirius#1063 but incrementally molding the API. The removal of the conversion API basically mandates that the user go through the idle state before acquiring the alternate state. Going from idle to mutable was a grey area anyways because that meant that anyone with a read only handle could get to and mutate the internal state, which broke the invariant of immutability. |
| * | ||
| * Atomic, lock-free. | ||
| */ | ||
| void subscribe(); |
There was a problem hiding this comment.
It is a bit strange but I believe these now need to be const. E.g., if a read only data batch is the only owner, and then transitions to idle, it cannot unsubscribe (compile error). Worth adding a test for this case.
Make
read_only_data_batchtruly const, disallowing any mutating operations, directly or indirectly.