Commit Graph

38 Commits

Author SHA1 Message Date
Rafael Weinstein abc7102ad6 Clean following HttpStore implementation 2015-08-24 10:57:50 -07:00
Rafael Weinstein 0b57427496 Remove default hostname for httpstore 2015-08-21 14:34:23 -07:00
Rafael Weinstein f6490cbbe5 Add HttpStore implementation 2015-08-21 14:22:45 -07:00
Rafael Weinstein b6ebb67e91 Fix AWS update breakage 2015-08-21 14:21:04 -07:00
Rafael Weinstein 06c5bc6c1b Abstract ChunkStoreWriter 2015-08-20 10:58:41 -07:00
Rafael Weinstein 94e7c3b73a Abstract a bunch of (haphazzardly) duplicated tests into chunk_store_test 2015-08-19 18:23:09 -07:00
Rafael Weinstein 0e7d61efc6 Remove errors from ChunkStore and Ref 2015-08-18 16:24:26 -07:00
Rafael Weinstein 0222b95ff2 LevelDBStore 2015-08-18 11:20:17 -07:00
Aaron Boodman 214b37eccf Remove global imports of dbg package
Fixes #179
2015-08-08 23:57:37 -07:00
Rafael Weinstein ee9a9ae03d Fix compile breakage as a result of updating aws import 2015-08-04 15:44:40 -07:00
Aaron Boodman 82523740fb Merge pull request #151 from aboodman/iocopy
Use io.Copy in fileChunkWriter rather than Bytes()
2015-07-29 15:26:33 -07:00
Aaron Boodman 3e472d447b Use io.Copy in fileChunkWriter rather than Bytes()
Fixes #145.

I looked for other occurences via `git grep Bytes()`. Only other
suspicious cases I found were related to types.Blob, which doesn't
deal in io.Reader yet, and memoryChunkWriter. In memoryChunkWriter
we're copying from a buffer, so I don't think there's any win, so
left that one.
2015-07-29 15:21:17 -07:00
Aaron Boodman 4488d6b4c6 Abbreviate chunkstore related flags
We type them a lot and the long names are annoying.
2015-07-29 15:01:25 -07:00
Chris Masone d1e1fb4f01 Revise some comments per feedback 2015-07-29 09:22:56 -07:00
Chris Masone 5a5ba47fb4 Add comments to DataStore and ChunkStore
Towards issue #136
2015-07-28 16:01:18 -07:00
Chris Masone f47d117bf2 Add pull command line tool, test for pulling an initial commit, address comments
In addition to putting in the 'pull' tool that I forgot to add in my initial PR,
I added an extra unit test to cover a case that we found to be buggy, as well
as addressing some comments by aa and arv.

1) Switched to io.Copy in CopyChunks
2) Added NewFlagsWithPrefix()
3) Cleaned up some error reporting
2015-07-28 11:21:45 -07:00
Chris Masone 0d830e3c1d Pull from one ChunkStore to another
This initial implementation requires that both the "remote" and local
ChunkStores be accessible by the machine running the pull command.
I took an initial pass at splitting up the functions so that, e.g.,
calculating which refs are needed could be done on an actual remote
machine, and we can add a chunk copying routine that gets data from
the network or something.

Towards issue #81
2015-07-27 11:41:18 -07:00
Erik Arvidsson 1b23a779a1 Merge pull request #94 from arv/read-through-store
Add a ReadThroughStore which caches the values in a caching store
2015-07-21 14:18:29 -07:00
Erik Arvidsson 77681f78fe Add a ReadThroughStore which caches the values in a caching store 2015-07-21 14:15:59 -07:00
Erik Arvidsson f08e7f0f5e Make sure that FileStore returns no error for missing refs 2015-07-21 13:13:46 -07:00
Erik Arvidsson 8b566139d0 Fix MemoryStore to get the ref in close 2015-07-21 09:37:07 -07:00
Chris Masone bd3a5ee878 Fix comments about hot paths to refer to a bug instead 2015-07-20 15:23:25 -07:00
Chris Masone 0c58895cde Add a few reminder comments about hot-paths 2015-07-20 10:49:09 -07:00
Chris Masone a22b9de144 Changes to xml_importer.go to allow for naive benchmarking
Introduce the 'NopStore', which is a sorta-ChunkStore that throws away
all written data. Get() can't really be called on it, as a result,
but it's useful for taking IO totally out of the equation when testing
our code for performance.

Towards issue #67
2015-07-20 10:08:00 -07:00
Chris Masone 4632a73bc2 Performance improvements, given the xml_importer workload
1) Get rid of temp file usage in FileStore. Instead, write to a buffer and then
   dump to disk on Close().
2) Chk.Equals() uses reflection even if you call it on primitive types, which
   can be surprisingly costly. Switch to a Chk.True() in a couple of hot paths.
2015-07-17 14:14:42 -07:00
Aaron Boodman 8f3a0c4b9d Make AWSStore not put duplicate objects.
Fixes #16.
2015-07-16 12:59:54 -07:00
Erik Arvidsson e37b50f7a2 Rename s3Store to awsStore
Fixes #38
2015-07-15 18:00:14 -07:00
Aaron Boodman c364850618 Fix some bone-headed-ness in s3 flag handling. 2015-07-14 18:05:58 -07:00
Chris Masone 3dcc16dd4c Fix some nits in file_store_test.go and s3_store_test.go
1) Members of the 'suite' struct can be private
2) file is not a reserved word, so no need for fyle
3) no 'new'
2015-07-10 11:46:54 -07:00
Chris Masone 6c3047cf03 Make all ChunkStore impls crash on Write() after Close/Ref()
I incorrectly said this was already true in a previous patch, so
make it true now!

Also, updated file_store_test.go and s3_store_test.go to use stretchr
testify suites so they can share setup and teardown code.

Fixes issue #5 as well
2015-07-10 11:31:11 -07:00
Aaron Boodman 4b4a1b1f47 FileStore should not write duplicate files (issue 16) 2015-07-08 11:40:07 -07:00
Chris Masone 7a84f6313e Cleanup Close() and Ref() semantics in ChunkStore impls
In both FileStore and S3Store, the behavior of calling Ref() twice, or of
calling Ref() after Close() was undefined and probably crashy. After this,
the semantics are as follows:

Once either Ref() or Close() is called, you can't Write() any more.
Ref() can be called any number of times
Close() can be called any number of times
Ref() and Close() can be called in any order.

Addresses issue #6
2015-07-07 15:54:20 -07:00
Aaron Boodman cb1fb984b3 Remove distinction between RootTracker and ChunkStore in DataStore 2015-07-05 23:05:51 -07:00
Rafael Weinstein 153d83600e remove named TODOs 2015-06-25 09:47:54 -07:00
Aaron Boodman fdebc00dc9 Add first app: clients/counter! 2015-06-19 15:23:02 -07:00
Aaron Boodman b92551d711 Move the TODOs into bugs ... it is easier that way to refer to them from within the code 2015-06-18 18:11:52 -07:00
Aaron Boodman 4815998aa9 Add AppRootTracker and test 2015-06-18 17:59:48 -07:00
Aaron Boodman b33cab2b34 Rename package 'store' to 'chunks'.
This is in preparation for renaming the 'Commit' abstraction to
DataStore. So we will essentially have a 'chunkstore' abstraction
and a 'datastore' abstraction.
2015-06-16 16:19:16 -07:00