Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Refactor how chunks are persisted. #95

Merged
merged 3 commits into from
Jan 5, 2016
Merged

Refactor how chunks are persisted. #95

merged 3 commits into from
Jan 5, 2016

Conversation

woodsaj
Copy link
Member

@woodsaj woodsaj commented Jan 5, 2016

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.

woodsaj pushed a commit that referenced this pull request Jan 5, 2016
Refactor how chunks are persisted.
@woodsaj woodsaj merged commit dd6f106 into master Jan 5, 2016
@woodsaj woodsaj deleted the issue94 branch January 5, 2016 09:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant