Commit Graph

3 Commits

Author SHA1 Message Date
Chris Masone
40efa266bd Factor Put-cache out of HTTPStore and DynamoStore
There was some copypasta. Now it's extracted into its own struct
that provides the same API and semantics.
2016-02-24 13:51:53 -08:00
Rafael Weinstein
31522bea6e Revert "DynamoStore: write full batches (until UpdateRoot), do so concurrently"
This reverts commit 10c8f8a447.
2016-02-23 17:15:58 -08:00
Chris Masone
10c8f8a447 DynamoStore: write full batches (until UpdateRoot), do so concurrently
With this patch, DynamoStore will now hold off writing anything to
the backend until it's got a full batch or someone calls UpdateRoot().
When it's time to write, DynamoStore will now fire off a new goroutine
to build the request (including compressing chunks), send it, and wait
for a response. It will keep up to dynamoWriteConcurrency concurrent
batch writes in flight.

Includes statKeeper, which provides a way for concurrent goroutines to
keep stats like write count, bytes written, etc. Also includes a refactor
to make unwrittenPutCache a separate type that both HTTPStore and
DynamoStore use instead of using copypasted code.
2016-02-23 14:23:39 -08:00