This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
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.
New approach uses a pool of worker goroutines to process all chunks.
The change here removes the per-series channel to limit the number of un-saved chunks that can be present. Instead of queues per series, there is now just 1 writeQueue (buffered channel) shared by all series. As a result this single writeQueue should be quite large, large enough to hold all outstanding writes. If we wanted to hold 10 unwritten chunks then the queue would need to be ~10x the number of series. So if there were 100k series and we wanted to have up to 10chunks unwritten, the queue size (cassandraWriteQueueSize) would need to be 1million. The amount of memory needed for this is actually less then the amount needed for 100k individial queues with a size of 10.