Commit Graph

3281 Commits

Author SHA1 Message Date
Rafael Weinstein
aaa66ea86f Update README.md 2017-01-23 16:24:43 -08:00
Aaron Boodman
7e5af655e7 bump version because of format version change (#3107) 2017-01-23 15:50:32 -08:00
Rafael Weinstein
08d9d5f4aa Introduce walk.WalkDifferentStructs (#3104)
This patch adds a static function which can walk graphs looking for (and diffing) two structs. It uses type information to avoid traversing sub-values which can't contain structs. It also uses a similar approach as sync to avoid visiting common sub-chunk-graphs.
2017-01-23 15:21:41 -08:00
Rafael Weinstein
d890a35b92 Update README.md 2017-01-23 15:19:31 -08:00
Rafael Weinstein
77a24a0730 Update README.md 2017-01-23 15:17:58 -08:00
cmasone-attic
cfa109f502 Switch Map/Set Diff to use top-down by default (#3106)
The only thing that wants what we used to call the "best" diff
algorithm is the command-line tools. Non-interactive programs all want
the algorithm that finishes up fastest, which is top-down.

Fixes https://github.com/attic-labs/attic/issues/627
2017-01-23 15:08:50 -08:00
Mike Gray
c7ae4b31fe Fix warning of unmet peer dependency (#3105) 2017-01-23 17:39:46 -05:00
cmasone-attic
d809bb2a09 Increase Chunk locality when writing Values through ValueStore (#3064)
Readahead + NBS benefit greatly when "related" Chunks are close to
each other. The current code did a good job of writing siblings in the
Chunk graph next to each other, but "cousins" (that is, children whose
parents are siblings) might wind up spread quite far apart.  This
patch makes WriteValue hold onto novel Chunks until it sees a
_grandparent_ come through the pipeline. All of that Chunk's queued
grandchildren will be Put at that time.

Additionally, ValueStore.Flush() now takes a Hash and flushes all
Chunks that are reachable from the Chunk with that Hash, as opposed
to simply flushing all Chunks to the BatchStore. This means that
there's now no supported way to write orphaned Chunks/Values to a
Database.

Fixes #3051


* More logging for TestStreamingMap2
2017-01-23 12:16:55 -08:00
cmasone-attic
6e72c137a2 Make database root a Map<String, Ref<Value>> (#3093)
Since the head of each dataset can have an arbitrarily complex
type, type accretion leads the Datasets map at the root of the
DB to become very large. This type info isn't really very useful
at that level either. So, get rid of it by making this map be
from String -> Ref<Value>.

Fixes #2869
2017-01-22 11:17:17 -08:00
Rafael Weinstein
da22039017 add 1-year Cache-Contro: max-age to /getBlob/ urls (#3098) 2017-01-22 09:33:07 -08:00
Erik Arvidsson
d4132e9e6c Use cp instead of ln (#3100) 2017-01-20 18:41:56 -08:00
cmasone-attic
5801bd9d2a Retry NomsBlockStore.Flush() with exponential backoff (#3094)
* Vendor in small backoff library

* Retry NomsBlockStore.Flush() with exponential backoff

Fixes #3089
2017-01-20 13:25:49 -08:00
Erik Arvidsson
e90bfcbd2a Switch to Yarn (#3092)
brew install yarn
2017-01-20 11:42:32 -08:00
Erik Arvidsson
6fd186d060 Update to a newer documentationjs (#3088) 2017-01-19 11:38:16 -08:00
Mike Gray
d7c8c816f4 Remove old go samples. They are no longer needed. (#3087) 2017-01-19 12:39:00 -05:00
Aaron Boodman
801dde854a Remove all the old js samples. They are no longer needed. (#3086) 2017-01-18 21:24:34 -08:00
Aaron Boodman
a5a11f5345 Bump Noms JS SDK version to 68.3.0 for perf improvements (#3085) 2017-01-18 17:40:05 -08:00
Rafael Weinstein
7397fbbb1a Add /getBlob/ endpoint (#3082)
Add /getBlob/ endpoint
2017-01-17 18:25:33 -08:00
Erik Arvidsson
f6a6283ee5 Add DateTime util struct (#3073)
This allows us to consistently marshal back and forth between time.Time
and a Noms struct.

Fixes #2970
2017-01-17 15:47:16 -08:00
Rafael Weinstein
86e812a5db (JS) Don't preload iterators (#3078)
dont preload iterators
2017-01-17 13:49:22 -08:00
Erik Arvidsson
2dfb4040b7 Update to Flow 0.36 (#3079) 2017-01-17 11:56:20 -08:00
Rafael Weinstein
759c36c96f Walk avoids blobs (#3074) 2017-01-13 16:32:40 -08:00
Eric Halpern
930e54cb6d Fix race conditions marshal.typeDecoders (#3072)
When constructing a recursive decoder (e.g, mapDecoder, arrayDecoder, setDecoder),
the new decoder is placed in the cache before its element decoders are created to
avoid a cycle.

If another go routine finds the new decoder in the cache, it can use it before it's
fully initialized.

Use a RWMutex to guard against this. Take the write lock out before adding the decoder
to the cache and release after the element decoders have been initialized.

Use a read lock in the decoder to function go ensure that it blocks until initialization
is complete.

toward: #3071
2017-01-13 13:11:27 -08:00
Rafael Weinstein
760e7f9945 (JS) Implement parallel walk io (#3070)
(JS) Implement parallel walk io
2017-01-12 15:57:02 -08:00
Rafael Weinstein
3b3835492c paralleize the io of walk (#3067) 2017-01-12 11:53:49 -08:00
Erik Arvidsson
554d4da885 Upgrade to use latest webpack-config (#3066) 2017-01-11 18:47:22 -08:00
Erik Arvidsson
15f188ac2c webpack-config: Pick up noms version next (#3065)
Make sure we replace process.env.NOMS_VERSION_NEXT for webpack builds
2017-01-11 17:58:23 -08:00
cmasone-attic
bac5f2ab5d Only request remaining hashes in httpBatchStore.GetMany() (#3062)
In httpBatchStore.GetMany(), we check our unwritten
puts to see if any of the requested chunks already
exist locally. If any do, we're _supposed_ to remove
their hashes from the set slated to be requested from
the server. That logic was borked.

Towards https://github.com/attic-labs/attic/issues/503

* Add zero check

Also Fixes #3063
2017-01-11 15:57:03 -08:00
Erik Arvidsson
2f6f760658 Work around environment variable issue. (#3061)
We are using babel-plugin-transform-inline-environment-variables which
replaces `process.env.FOO` with the value of the `FOO` environment
variable at compile time.

However, due to our pipeline we end with something like:

```js
var NAME = 'NOMS_VERSION_NEXT';
process.env[NAME]
```

which does not get replaced in development mode. If it was a const the
transformer could replace it but var bindings can change.
2017-01-11 15:08:04 -08:00
Rafael Weinstein
89cd026c46 Fix bug in read ahead for sequence.iter (#3060)
fix bug in read ahead for sequence.iter
2017-01-11 14:28:28 -08:00
Rafael Weinstein
d0bf8ddc55 fix bug in ReadManyValues (#3059) 2017-01-11 11:54:01 -08:00
Aaron Boodman
c885ace18f Bump js package again. (#3056)
I had already used 66 in a previous commit that was reverted.
2017-01-10 18:09:50 -08:00
Aaron Boodman
377e730bd2 Bump js package version because of noms format change. (#3055) 2017-01-10 15:53:22 -08:00
Rafael Weinstein
5fa5484f46 remove orederedparallel (#3050) 2017-01-10 15:45:05 -08:00
Rafael Weinstein
01303a828d go read ahead (#3046) 2017-01-10 15:28:26 -08:00
Rafael Weinstein
c3427a4364 Introduce go blob-put (#3053)
Introduce go blob-put
2017-01-10 15:02:02 -08:00
Aaron Boodman
c5805766f5 Enable v8 by default (#3045) 2017-01-10 14:43:55 -08:00
cmasone-attic
5757ae3bb0 compactingChunkStore.count() must block on compaction (#3048)
Compaction not only persists the contents of a memTable, it also
filters out duplicate chunks. This means that calling count() on a
compactingChunkStore before and after compaction completes could lead
to different results. In the case where the memTable contains only
duplicate chunks, this is Very Bad becuase it leads to an non-existent
table winding up in the NBS manifest.

Fixes #3044
2017-01-10 12:22:40 -08:00
Erik Arvidsson
431a258af5 Update js-tour.md
Fix link to docs.noms.io
2017-01-10 10:51:51 -08:00
Aaron Boodman
bc7c305101 Update README.md 2017-01-09 18:34:13 -08:00
Aaron Boodman
eb605f3d03 Update README.md 2017-01-09 18:33:36 -08:00
Aaron Boodman
ecf2cfb408 Update README.md 2017-01-09 18:32:49 -08:00
Aaron Boodman
a09ef6fb44 Revert "Introduce noms version 8. Use it to guard type simplification." (#3043) 2017-01-09 16:30:25 -08:00
Ben Kalman
5abf5ccff4 Implement marshal.Unmarshaler interface (#3039) 2017-01-10 09:12:39 +11:00
cmasone-attic
ee2a5fa510 Make DeserializeToChan return an error, use it everywhere (#3042)
Chunk deserialization can run into errors sometimes if, e.g. the
client hangs up during a writeValue request. The old error strategy
worked by throwing a "catchable" error and recovering. That's OK if
you've only got one goroutine, but since the writeValue handler starts
so many goroutines, architecting the code to deal with error handling
by panic/recover is dicey.

Instead, make DeserializeToChan return an error in the more common
failure cases and handle it by passing it over a channel and raising
it from a central place.
2017-01-09 13:58:44 -08:00
Rafael Weinstein
1d49c08481 avoid concurrent access to hashmap (#3041) 2017-01-08 17:05:05 -08:00
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
Aaron Boodman
a4ffa5ba9b Introduce noms version 8. Use it to guard type simplification. (#3035)
Introduce noms version 8. Use it to guard type simplification.
2017-01-06 17:32:32 -08:00
Ben Kalman
528355c9be Write sequence read-ahead cache to correct index (#3025) 2017-01-06 09:52:47 +11:00
Erik Arvidsson
1e0a698781 Type accretion for struct fields should use equal (#3029)
We used to use isSubtype but we should just create a more specific type
when we can.

Fixes #2993
2017-01-05 13:57:42 -08:00