* Implement `unionTypes(a, b *types.Type) *types.Type`
Implements type merging building off of makeSimplifiedUnion.
The difference between siplified unions and merged types are
in how structs are handled. In the former, we produce the intersection
of input structs to ensure the simplified type is a supertype of the input
types. In the later, we produce the union of the input structs which leads
to a type that is a subtype of all inputs.
Response to review and discussion
- Rename to MakeFullUnion to MakeMergedType
- Revert to old file naming
- Rename makeSimplifiedType to makeSupertype
- MakeUnion delegates to makeSupertype. Should prabably be be renamed, but
this touches a lot of files, so keeping same for now.
fixes: #3204
* Rename to makeSimplifiedType and makeSimplifiedType2
When we have a cyclic type we ended up getting the non complete type out
of the map.
Use graphql.FieldsThunk which is designed to allow recursive types.
We're getting some TCP hangups when trying to talk to S3.
We have an S3 reading rate limiter that's supposed to
prevent issues like this, so the question is whether that's
set too high. Rather than just turning the knob and seeing
if things are OK, this patch adds some logging to verify
that we're actually hitting the rate limiter.
The names of GraphQL types needs to be globally unique. We therefore
name struct types as NAME_HASH (where hash is the first 6 chars of
the noms hash).
Also, make sure that we always map the noms type to the same GraphQL
type, even if the boxedIfScalar is true.
Fixes#3161
NBS is stable enough that we've made it the default store for command
line tools, and the go-to store for tests that require temporary, but
persistent, storage.
We intend to remove support for LevelDB-backed chunk storage
completely ASAP. This patch removes all usage of LevelDBStore from
noms.git, but doesn't remove LevelDBStore _just_ yet as there are
still some dependencies on it elsewhere.
Toward #3127
I missed this in the compaction patch :-/ I caught it in another
test when the code panic'd while trying to write a manifest with
an empty table in it. So at least it got caught there?
BUG 3156 is caused by the compaction code trying to estimate the
maximum possible table size for chunk data pulled from a bunch of
existing tables. The problem was that we only had _compressed_ data
lengths for the chunks in existing tables, so we were drastically
underestimating the worst-case space that we might need during
compaction.
The fix is to have tables store the total number of _uncompressed_
bytes that were inserted, so that the compaction code can use this to
get the right estimate when putting together a bunch of tables.
Fixes#3156
When we do a writeValue we do a POST with a request body of some binary
data. Some clients (RN) do not set the content-type header which then
leads to failure on our server.
Though Raf and I can't figure out how, it's clear that the method we
initially used for calculating the max amount of space for
snappy-compressed chunk data was incorrect. That's the root cause of
of all the chunks to be written and summing the snappy.MaxEncodedLen()
for each.
Fixes#3156
Apparently, there's some issue running demo-server with --verbose
in prod, so we don't do it. This means that the logging info I
added isn't showing up. Change the logging code to use fmt.Fprintf()
Also, add unit test for errata functionality.
Towards #3156
Add support for unions containing scalar values by "boxing" those scalars in that context. Also add a hash field to Struct so that empty structs have at least one field