Commit Graph

3216 Commits

Author SHA1 Message Date
Ben Kalman
be2e714545 Implement @at in JS paths (#3010) 2017-01-04 11:58:08 +11:00
Ben Kalman
9b149516ef Implement JS Map and Set at() (#3009) 2017-01-04 11:31:09 +11:00
moxiegirl
b0d177d1be Adding guidance to the README (#3000)
Signed-off-by: moxiegirl <moxieandmore@gmail.com>
2017-01-03 14:52:48 -08:00
Ben Kalman
f83e5b5b9c Refactor JS path code and implement @type (#3003)
This brings it much closer to the Go implementation, and eventually
implementing the @at annotation.
2017-01-04 09:32:07 +11:00
Rafael Weinstein
e0d8445ccd Js sequence refactor (#2998)
Removes IndexedSequence and OrderedSequence. What remain are MetaSequence and each of the leaf sequences which directly inherit from Sequence.
2017-01-03 14:03:17 -08:00
Rafael Weinstein
4f72960e0e TestHandleGetRefs (#3007)
The order of returned chunks is no longer guaranteed.
2017-01-03 13:58:31 -08:00
Rafael Weinstein
35686e6eb9 Address write timeout (#3008)
Ups the response-header timeout to 4m, and adds some additional log output which hopefully will shed some light on why some writes are taking so long.
2017-01-03 13:54:31 -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
cmasone-attic
258b3e8f11 Enable noms serve to serve nbs-aws stores (#3001)
There's no reason that this shouldn't work, so make it do so
2017-01-02 17:17:42 -08:00
cmasone-attic
ca31583a08 Add new spec for nbs-aws (#2997)
The new spec is a URI, akin to what we use for HTTP It allows the
specification of a DynamoDB table, an S3 bucket, a database ID, and a
dataset ID: aws://table-name:bucket-name/database::dataset

The bucket name is optional and, if not provided, Noms will use a
ChunkStore implementation backed only by DynamoDB.
2017-01-02 08:24:45 -08:00
Aaron Boodman
b5f3c8bc4f add noms show --raw (#2991)
add noms show --raw
2016-12-26 11:38:46 -08:00
cmasone-attic
22d8e175f7 Modify httpBatchStore so that writing values maintains some locality (#2983)
NBS benefits from related chunks being near one another. Initially,
let's use write-order as a proxy for "related".

This patch contains a pretty heinous hack to allow sync to continue
putting chunks into httpBatchStore top-down without breaking
server-side validation. Work to fix this is tracked in #2982

This patch fixes #2968, at least for now

* Introduces PullWithFlush() to allow noms sync to explicitly
pull chunks over and flush directly after. This allows UpdateRoot
to behave as before.

Also clears out all the legacy batch-put machinery. Now, Flush()
just directly calls sendWriteRequests().
2016-12-23 11:48:42 -08:00
Aaron Boodman
fe53c15552 Marshal() should accept original field with empty value. (#2985) 2016-12-23 00:20:29 -08:00
Ben Kalman
1cf183b8f0 Temporarily remove kalman from coffee rotation (#2974)
Joke dude.
2016-12-22 17:20:45 -08:00
Erik Arvidsson
ed1e386e24 JS: Make equals and compare exit early if === (#2951) 2016-12-22 13:38:57 -08:00
Aaron Boodman
e451a01441 Add support for original in marshal.Marshal (#2978)
Add support for `original` in marshal.Marshal

Now it roundtrips
2016-12-22 13:12:51 -08:00
Rafael Weinstein
d8d8c6c7e1 Parallel s3 Slice reads (#2979)
GetMany() calls can now be serviced by <= N goroutines, where N is the number of physical reads the request in broken down into.

This patch also adds a maxReadSize param to the code which decides how to break chunk reads into physical reads, and sets the s3 blockSize to 5MB, which experimentally resulted to lower total latency.

Lastly, some small refactors.
2016-12-22 11:45:33 -08:00
Erik Arvidsson
6bc82b03dd Revert "Marshal: Be more lenient when unmarshal a struct (#2975)" (#2977)
This reverts commit b64f1d5dc9.

Reason: It is breaking samples/go/photo-index

Reopens: #2971
2016-12-21 19:14:59 -08:00
Erik Arvidsson
b64f1d5dc9 Marshal: Be more lenient when unmarshal a struct (#2975)
This is a potentially breaking change!

Before this change we required all the fields in a Go struct to be
present in the Noms struct when we unmarshal the Noms struct onto the
Go struct. This is no longer the case, which means that all fields in
the Go struct that are present in the Noms struct will be copied over.

This also means that `omitempty` is useless in Unmarshal and it has been
removed.

This might break your code if expected to get errors when the field
names did not match!

Fixes #2971
2016-12-21 16:29:05 -08:00
Erik Arvidsson
521e7b6bae Marshal: Use nil for empty Go collections (#2973)
This is a breaking change!

We used to create empty Go collections `[]int{}` when unmarshalling an
empty Noms collection onto a Go collection that was `nil`. Now we keep
the Go collection as `nil` which means that you will get `[]int(nil)`
for an empty Noms List.

Fixes #2969
2016-12-21 16:21:15 -08:00
Rafael Weinstein
206eb6a38d Remove import of isPrimitiveKind 2016-12-20 17:04:56 -08:00
cmasone-attic
d129580007 Add frag tool to measure nbs fragmentation (#2963)
Before we can defragment NBS stores, we need to understand how
fragmented they are. This tool provides a measure of fragmentation in
which optimal chunk-graph layout implies that ALL children of a given
parent can be read in one storage-layer operation (e.g. disk read, S3
transaction, etc).
2016-12-20 17:01:18 -08:00
Ben Kalman
4eca6085cb Allow skipping invalid fields when marshalling (#2967)
Currently unexported fields refuse to marshal or unmarshal, even if
they're told to skip. Now, they can be skipped. By default, they are
still errors.
2016-12-20 16:47:49 -08:00
Rafael Weinstein
cb3390924f Remove unnecessary invariants (#2966)
Remove unnecessary invariants
2016-12-20 15:52:26 -08:00
wardn
262f10a14b Update go tour documentation to reflect dataset changes (#2960) 2016-12-20 09:01:17 -05:00
Aaron Boodman
a1c75f04d6 Fix crash in picasa importer with large albums (#2965)
Fixes https://github.com/attic-labs/attic/issues/317
2016-12-19 21:42:25 -08:00
Mike Gray
094ec4c94f Allow json-import input to be a file (#2964) 2016-12-19 19:27:05 -05:00
Ben Kalman
fa1ab8a61c Make datas.localFactory public and add NewLocalFactory (#2961)
I want to adapt datas.NewLocalFactory(chunks.NewMemoryStoreFactory()).
2016-12-19 10:46:25 -08:00
Dan Willhite
d41a4bc6f7 Add set methods to verbose. (#2962) 2016-12-19 10:26:58 -08:00
cmasone-attic
9998ec0301 NBS: tableSet must exclude empty tables during ToSpecs() (#2959)
Fixes #2957
2016-12-15 11:45:39 -08:00
Dan Willhite
150d66010d Use merge policy to avoid dl-cache conflicts in downloader (#2958) 2016-12-15 10:21:12 -08:00
cmasone-attic
35385900d6 Close some NBS tableSets during testing (#2956)
Leaving these open can leak file handles
2016-12-14 17:17:58 -08:00
Rafael Weinstein
d2289219c3 dont flush for every batch during VBS.Enqueue (#2955) 2016-12-14 16:36:12 -08:00
Rafael Weinstein
f409db8c74 Add s3 tableIndex cache (#2953) 2016-12-14 15:06:31 -08:00
Rafael Weinstein
e242c9d168 Move concrete impls out of table_persister.go (#2952) 2016-12-14 12:48:05 -08:00
Rafael Weinstein
cc8ffacddf Factor tableIndex out of tableReader (#2950)
Factor tableIndex out of tableReader
2016-12-14 12:41:01 -08:00
Rafael Weinstein
d7ee0025d6 Open NBS tables in parallel (#2946) 2016-12-13 14:15:25 -08:00
Rafael Weinstein
373900c790 fix 2016-12-13 10:25:49 -08:00
Rafael Weinstein
c159876992 Make read amplification threshold configurable (#2941) 2016-12-13 09:57:41 -08:00
cmasone-attic
7f36fad716 tablePersister.Compact returns a chunkSource (#2939)
It turns out the only caller of Compact() immediately
turns around and calls Open, so why don't I just do
that FOR you?

Fixes #2935
2016-12-13 06:20:33 -08:00
Rafael Weinstein
ef4e6c48d3 AWSStoreFactory (#2938) 2016-12-12 15:55:56 -08:00
Rafael Weinstein
335454b34c ChunkSink.Flush() (#2937)
Add ChunkSink.Flush() which signals the ChunkSink that any previously Put chunks should be made durable.
2016-12-12 15:39:13 -08:00
cmasone-attic
de6e49c9e0 compactingChunkStore crash fix (#2936)
compactingChunkStore.close() must wait for compactions to finish.
2016-12-12 14:43:46 -08:00
cmasone-attic
7fe3b18a6b Make compaction async (#2934)
Introduce a 'compactingChunkStore', which knows how to compact itself
in the background. It satisfies get/has requests from an in-memory
table until compaction is complete. Once compaction is done, it
destroys the in-memory table and switches over to using solely the
persistent table.

Fixes #2879
2016-12-12 14:15:30 -08:00
Rafael Weinstein
0652e0b3e0 Add ChunkSource.GetMany(); RemoteBatchStore getRefs uses GetMany() (#2933)
Add GetMany(), which most ChunkStores implement by repeated calls to their own Get(), but creates the opportunity for stores to optimize reads of larger blocks of potentially sequential chunks (e.g. NBS).

Add RemoteBatchStore getRefs endpoint support for calling GetMany() rather than Get()

Remove ReadThroughChunkStore which was dead code.
2016-12-12 11:18:22 -08:00
Erik Arvidsson
80d4894fcc JS: Fix walk
The promise was resolving too early.
2016-12-09 18:51:49 -08:00
Aaron Boodman
fe59ae9504 Revert "Fix JS walk handling for values of type Type (#2913)" (#2931)
This reverts commit 2717908d2b.
2016-12-09 17:43:26 -08:00
Rafael Weinstein
88691863f4 Add simple read ahead for JS Collections (#2930)
Adds the ability for SequenceCursors to eagerly load all child sequences when the first child is requested.

The effect is for uses where noms tends to forward scan, it will read in batches of ~150 chunks (e.g. ~512k) rather than one chunk at a time.

On my MBP, this improves the raw blob read perf over http from ~60K/s to ~5MB/s.
2016-12-09 16:08:38 -08:00
Erik Arvidsson
741563958d Remove again and again 2016-12-09 12:46:54 -08:00
Erik Arvidsson
27267581d5 Again and again (#2929) 2016-12-09 12:16:05 -08:00