chore: add initial support for an sqlite oplog store #499
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds initial support for an sqlite oplog store. Future work will be needed to add migrations and move over to sqlite for a more consistent data store.
Bbolt so far has been very reliable, but is not particularly standard whereas sqlite offers an easily understandable schema for contributors. As backrest matures maintainability becomes a priority.
Some datapoints --
Benchmark results suggest that sqlite is at very much "fast enough". Operations are slightly slower in some cases with small numbers of operations in the log, but scale much better overall. The "get last item" results are of particular interest as this is the operation that's polled frequently when scheduling tasks.