Commit Graph

15 Commits

Author SHA1 Message Date
Rafael Weinstein a67bb9bf7b Minor rework of hash.Hash API (#2888)
Define the hash.Hash type to be a 20-byte array, rather than embed one. Hash API Changes: `hash.FromSlice` -> `hash.New`, `hash.FromData` -> `hash.Of`
2016-12-02 12:11:00 -08:00
Rafael Weinstein b5cd065de1 OrderedPutCache.ExtractChunks writes to chan *chunks.Chunk rather than io.Writer (#2099)
OrderedPutCache.ExtractChunks exposes a channel of chunks
2016-07-20 11:28:26 -07:00
Chris Masone 143b27d833 Add validation to BatchStore used by LocalDatabase ONLY during Pull()
LocalDatabase generally uses a BatchStoreAdaptor, which is a kinda
dumb wrapper around ChunkStore. During a Pull(), though, this would
cause Chunks to be Put in a top-down fashion, meaning that Chunks
wound up in the backing store _before_ other Chunks that they
reference.  This means that LocalDatabases were transiently invalid,
and that cancelling an in-progress pull could lead to an invalid DB.

Now, calling validatingBatchStore() on a LocalDatabase returns a
BatchStore that uses the same strategy as RemoteDatabaseClient,
caching chunks as the come in and putting them into the backing store
bottom-up when Flush() is called.

Fixes #1915
2016-07-18 15:48:31 -07:00
Erik Arvidsson 1507b8dd8f Go: Change hash function to sha512 2016-07-12 13:59:08 -07:00
Aaron Boodman 1d752e3101 Update license: Noms will be copyright Attic Labs. (#1976) 2016-07-05 22:07:42 -07:00
Rafael Weinstein 55e067802d Reduce size of tmp LDB memtables to 128MB (#1921) 2016-06-27 17:15:57 -07:00
Dan Willhite 095d49fa84 New error handling. 2016-06-22 12:11:31 -07:00
Chris Masone 13af910a48 Re-land "tweak ldb settings for put cache (#1806)"
This reverts commit ba909929c2, but
tweaks the size of the memory cache so that, hopefully, Travis
doesn't barf. Maybe once travis is dead we can size up.

Fixes #1817
2016-06-15 10:05:37 -07:00
Chris Masone e5bab88631 Add concurrency to noms-sync
The basic approach here is to take the max of the heights of the
source and sink queues, then grab all the refs of that height from
both and sort them into three sets: refs in the source, refs in the
sink, and refs in both. These are then processed in parallel and the
reachable refs are all added to the appropriate queue. Repeat as long
as stuff still shows up in the source queue.

Fixes #1564
2016-06-14 16:05:30 -07:00
Rafael Weinstein ba909929c2 Revert "tweak ldb settings for put cache (#1806)"
This reverts commit 527a9bd6d6.
2016-06-13 13:13:43 -07:00
Rafael Weinstein 527a9bd6d6 tweak ldb settings for put cache (#1806)
tweak ldb settings for put cache
2016-06-13 11:18:40 -07:00
Chris Masone 58b44fae52 Small tweaks to speed HandleWriteValue a bit
The bigger change here is having chunks.DeserializeToChan take a
channel of *Chunk, instead of Chunk. It saves a couple of seconds
when committing the sfcrime dataset.

Also, get rid of a d.Chk.Equal in favor of a d.Chk.True and increase
the batch size that ValidatingBatchSink uses to reduce stalls due to
putting into a ChunkStore.
2016-06-10 08:38:53 -07:00
Chris Masone 31e25ffc81 Go: Allow serialization of a single Chunk without a Chunk serializer
In datas/put_cache.go, we need to serialize one chunk at a time. With
the old API, this entailed creating a serializer (which creates some
channels and a goroutine) only to use it for one Chunk.

Instead, just expose Serialize() and use it directly.
2016-06-09 12:54:27 -07:00
Chris Masone 42cb294b57 Go: writeValue/ payload uses snappy instead of gzip
We determined that gzipping the entire writeValue payload at Commit-
time was extremely time-expensive. After doing some experiments, it
seems that a couple of changes make Commit go a lot faster:

1) Use snappy instead of gzip
2) Compress chunks individually instead of delaying until the whole
   stream is ready.

This does result in more data needing to be sent over the network.
However, we get to the point of being able to send data _much_ sooner.

Since Chunks are compressed individually, the orderedChunkCache code
now compresses them before storing them, also saving disk space.
2016-06-08 15:46:08 -07:00
Aaron Boodman bb7ac52265 Move the Go SDK into noms/go 2016-06-05 02:14:49 -07:00