perkeep/pkg/schema
mpl db2604f981 pkg/schema: break static-sets in subsets for large directories
The current maximum size for a schema blob is 1MB. For a large enough
directory (~20000 children), the resulting static-set JSON schema is
over that maximum size.

We could increase that maximum, but we would eventually hit the maximum
blob size (16MB), which would only allow for ~300000 children. Even if
that is an uncommon size, it is technically possible to have such large
directories, so I don't think it would be reasonable to restrict users
to such a limit. So it does not seems like enough of a solution.

The solution proposed in this CL is to spread the children of a
directory (when they are more numerous than a given maximum, here set to
10000) onto several static-sets, recursively if needed. These
static-sets (subsets of the whole lot of children) are stored in the new
"mergeSets" field of their parent static-set schema. The actual fileRefs
or dirRefs, are still stored in the "members" field of the subset they were
spread in. The "mergeSets" and "members" field of a static-set are therefore
mutually exclusive.

Fixes #924

Change-Id: Ibe47b50795d5288fe904d3cce0cc7f780d313408
2018-02-09 01:36:38 +01:00
..
nodeattr all: more renaming of Camlistore to Perkeep 2018-01-30 03:02:56 -08:00
testdata schema: use GPS location to find timezone from EXIF when UTC offset is unknown 2014-07-13 10:26:54 -07:00
.gitignore Update from r60 to [almost] Go 1. 2012-02-18 21:53:06 -08:00
blob.go pkg/schema: break static-sets in subsets for large directories 2018-02-09 01:36:38 +01:00
dirreader.go pkg/schema: break static-sets in subsets for large directories 2018-02-09 01:36:38 +01:00
fileread_test.go pkg/schema: break static-sets in subsets for large directories 2018-02-09 01:36:38 +01:00
filereader.go blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps 2018-01-18 16:22:16 -08:00
filewriter.go blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps 2018-01-18 16:22:16 -08:00
filewriter_test.go blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps 2018-01-18 16:22:16 -08:00
lookup.go all: update copyright holder from Google Inc to The Perkeep Authors 2018-01-03 16:52:49 -08:00
lookup_cgo.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
lookup_nocgo.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
schema.go pkg/schema: break static-sets in subsets for large directories 2018-02-09 01:36:38 +01:00
schema_darwin.go schema: lot of Blob/Builder work, and kill schema.Map. 2013-01-21 20:56:12 -08:00
schema_linux.go schema: lot of Blob/Builder work, and kill schema.Map. 2013-01-21 20:56:12 -08:00
schema_posix.go schema: lot of Blob/Builder work, and kill schema.Map. 2013-01-21 20:56:12 -08:00
schema_public_test.go all: update copyright holder from Google Inc to The Perkeep Authors 2018-01-03 16:52:49 -08:00
schema_test.go pkg/schema: break static-sets in subsets for large directories 2018-02-09 01:36:38 +01:00
sign.go cmd/camtool: add "camtool whoami" subcommand 2018-01-23 14:02:32 -08:00
sign_test.go blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps 2018-01-18 16:22:16 -08:00