perkeep/cmd/camtool
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
..
.gitignore camdebug moved as camtool debug 2013-02-23 00:53:03 +01:00
camtool.go all: more renaming of Camlistore to Perkeep 2018-01-30 03:02:56 -08:00
claims.go blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps 2018-01-18 16:22:16 -08:00
dbinit.go vendor/github.com/go-sql-driver/mysql: upgrade to v1.3.0 2018-01-12 10:02:14 -08:00
debug.go all: simpify constructs by running gofmt -s on all code 2018-01-21 10:27:12 -08:00
describe.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
disco.go blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps 2018-01-18 16:22:16 -08:00
doc.go all: more renaming of Camlistore to Perkeep 2018-01-30 03:02:56 -08:00
dp_idx_rebuild.go all: update copyright holder from Google Inc to The Perkeep Authors 2018-01-03 16:52:49 -08:00
dumpconfig.go all: update copyright holder from Google Inc to The Perkeep Authors 2018-01-03 16:52:49 -08:00
env.go all: more Camlistore to Perkeep renamings 2018-01-30 13:31:59 -08:00
exif.go all: update copyright holder from Google Inc to The Perkeep Authors 2018-01-03 16:52:49 -08:00
googinit.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
index.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
list.go all: more renaming of Camlistore to Perkeep 2018-01-30 03:02:56 -08:00
makestatic.go pkg/schema: break static-sets in subsets for large directories 2018-02-09 01:36:38 +01:00
mime.go all: update copyright holder from Google Inc to The Perkeep Authors 2018-01-03 16:52:49 -08:00
packblobs.go pkg/client: reduce the number of New constructors, return error by default 2018-01-24 07:42:04 -08:00
search.go blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps 2018-01-18 16:22:16 -08:00
searchdoc.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
searchnames.go blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps 2018-01-18 16:22:16 -08:00
splits.go all: update copyright holder from Google Inc to The Perkeep Authors 2018-01-03 16:52:49 -08:00
sqlite_cond.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
sync.go pkg/client: reduce the number of New constructors, return error by default 2018-01-24 07:42:04 -08:00
sync_test.go all: update copyright holder from Google Inc to The Perkeep Authors 2018-01-03 16:52:49 -08:00
whoami.go pkg/client: reduce the number of New constructors, return error by default 2018-01-24 07:42:04 -08:00