Commit Graph

16 Commits

Author SHA1 Message Date
cmasone-attic e7a96c3748 Add ValueStore.ReadManyValues() (#3036)
The more code can use GetMany(), the better performance gets on top of
NBS. To this end, add a call to ValueStore that allows code to read
many values concurrently. This can be used e.g. by read-ahead code
that's navigating prolly trees to increase performance.

Fixes #3019
2017-01-08 14:37:37 -08:00
Rafael Weinstein 3242f18c20 [NBS] Implement Streaming GetMany (#3002)
Adds the ability to stream individual chunks requested via GetMany() back to caller.

Removes readAmpThresh and maxReadSize. Lowers the S3ReadBlockSize to 512k.
2017-01-03 12:25:01 -08:00
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
Erik Arvidsson 5edf89cf3d Replace d.Chk.True with d.PanicIfFalse (#2563)
And same for d.Chk.False
2016-09-14 13:11:28 -07:00
Erik Arvidsson 679305dad3 Add jsdoc/godoc for Hash and Value (#2553)
Towards #2297
2016-09-13 17:55:19 -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 455ed05251 Update hash.go (#2061) 2016-07-14 14:12:34 -07:00
Erik Arvidsson a92d8ffb21 GoDoc for Hash (#2038)
The comment should go with the package to get picked up by godoc
2016-07-13 11:49:23 -07:00
Erik Arvidsson b830762f49 Fix some copyright headers (#2026) 2016-07-12 16:02:32 -07:00
Erik Arvidsson 1507b8dd8f Go: Change hash function to sha512 2016-07-12 13:59:08 -07:00
Erik Arvidsson c0bc00dee0 Go: Add base32 support library
Our base32 uses 0-9a-v with no padding. The length is hard coded to
20 bytes (and 32 characters)
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
Ben Kalman 038192cfcc Make the spec package support types.Path (#1920) 2016-06-29 13:55:05 -07:00
Dan Willhite 095d49fa84 New error handling. 2016-06-22 12:11:31 -07:00
Rafael Weinstein d4941f6b1e Hash compare uses bytes.Compare (#1765) 2016-06-08 17:25:52 -07:00
Aaron Boodman bb7ac52265 Move the Go SDK into noms/go 2016-06-05 02:14:49 -07:00