diff options
| author | eunhhu <[email protected]> | 2026-09-27 23:38:54 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-27 23:38:54 +0100 |
| commit | ad27f1f5a4fc7a53d116feb9b1e2352239147fe0 (patch) | |
| tree | 85c2bca2056d9b62d4057f4fed82f1fcbb6cd959 /core | |
| parent | 72f8e1ca1fba181eeed6d2643a21f05881272d83 (diff) | |
| download | pure-ad27f1f5a4fc7a53d116feb9b1e2352239147fe0.tar.gz pure-ad27f1f5a4fc7a53d116feb9b1e2352239147fe0.zip | |
Let a runtime-owned state grow past the document limit
A list's stored form is one value in the tree store, so the limit on a
document (1.38 MiB, what a host carries whole as an HTTP body) capped a
table at about 51,000 rows of 28 bytes. A value the runtime owns, a state
(a key starting with '.') or a draft without a key, may now grow to 1 GiB;
documents keep their limit. The store's format is unchanged: its trees
already reach far past either.
Diffstat (limited to 'core')
| -rw-r--r-- | core/store.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/store.h b/core/store.h index dbfa8f8..64b8d9e 100644 --- a/core/store.h +++ b/core/store.h @@ -5,6 +5,11 @@ #include <stdint.h> #define PURE_OBJECT_LIMIT ((2u * 6u + 32u) * 32768u + 8192u) +/* A document (what a host carries whole, as an HTTP body) is at most + * PURE_OBJECT_LIMIT bytes. A value the runtime owns (an app's list or text + * state: a key starting with '.', or a draft without a key) may grow to + * PURE_STATE_LIMIT: a table of a million rows is one such value. */ +#define PURE_STATE_LIMIT (UINT64_C(1) << 30) typedef struct { void *mapping; size_t mapped_size, object_size; |
