Commit Graph

4 Commits

Author SHA1 Message Date
Chris Masone d8a2d285e9 Pull DataStore API over the wire and kill chunks.HTTPStore
This patch is unfortunately large, but it seemed necessary to make all
these changes at once to transition away from having an HTTP
ChunkStore that could allow for invalid state in the DB. Now, we have
a RemoteDataStoreClient that allows for reading and writing of Values,
and performs validation on the server side before persisting chunks.
The semantics of DataStore are that written values can be read back
out immediately, but are not guaranteed to be persistent until after
Commit() The semantics are now that Put() blocks until the Chunk is
persisted, and the new PutMany() can be used to write a number of
Chunks all at once.

From a command-line tool point of view, -h and -h-auth still work as
expected.
2016-04-12 14:08:58 -07:00
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