Use new higher-level abstractions #2
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 updates the log reader and log manifest to use the newer versions of the behaviors in osiris. The new log reader behaviour is at a higher level with callbacks like
chunk_iterator/3,iterator_next/1andsend_file/3for reading. This means we need to include more logic fromosiris_log, but the new reader is ultimately much cleaner and it makes the manifest behaviour less complex.Since the new behaviors are much different from the old ones, I have made new branches in rabbitmq-server (
streams-tiered-storage) and osiris (tiered-storage-abstractions) and updated the README here to point to them.There are a lot of outstanding TODOs especially in the manifest module. The basic "kick the tires" workflow should work:
With
tiered-storage.conflike so:Then publishing and consuming from a stream:
Note that to see reading from the remote tier, you need to delete some segment and index files from the head of the log and then stop rabbit and start rabbit. In order for this to work well (i.e. no reboot) we will need to get retention working - that's a TODO in the manifest.