@cloudbitmaps/roaring 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PRIVACY.md +3 -3
- package/README.md +7 -5
- package/dist/bin/export-segments.js +3 -2
- package/dist/bin/export-segments.js.map +2 -2
- package/dist/index.d.ts +18 -10
- package/dist/index.js +3 -2
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/PRIVACY.md
CHANGED
|
@@ -44,7 +44,7 @@ from constructing a cross-region topology. The points where personal data moves
|
|
|
44
44
|
|---|---|---|
|
|
45
45
|
| **Storage** (object store) | immutable `.crbm` generations — every generation a segment has had, until a superseded one is collected. Azure Blob objects, and GCS objects above the simple-upload threshold, also carry a random write id in their metadata (`cbwid`): 128 random bits, no data from the bitmap or the source | the region of the bucket you wire |
|
|
46
46
|
| **Registry** (S3 / GCS / Azure Blob / local) | one row per segment: the current-generation pointer, wrapped keys, retention metadata, and the current generation's id count and your metadata (sealed when the segment is encrypted) — no IDs, unless you put one in the metadata, which you must not. An Azure Blob row also carries the random write id in its metadata | the region of the bucket you wire |
|
|
47
|
-
| **cache** (process RAM) | decoded chunks, bounded LRU | **wherever your process/Lambda runs** — an EU segment queried from a US function is processed in the US |
|
|
47
|
+
| **cache** (process RAM) | decoded chunks, and the stored chunk bytes (ciphertext on an encrypted segment) a reader keeps of a small generation it read whole; bounded LRU | **wherever your process/Lambda runs** — an EU segment queried from a US function is processed in the US |
|
|
48
48
|
| **Loads and rewrites** (`store.load()`, the `*Into` verbs, `eraseSubject`) | read your source (or existing generations), write a new generation | run wherever you run them — a loader in one region writing to a bucket in another is a transfer |
|
|
49
49
|
| **Intersection** | pulls chunks from N segments into one process | co-locates those segments in one region |
|
|
50
50
|
|
|
@@ -126,7 +126,7 @@ after it returns, and re-run any erasure a rollback interrupted.
|
|
|
126
126
|
Erasure and crypto-shred are **immediate in storage and immediate in the store whose verb performed them**, for
|
|
127
127
|
every read that starts after the verb returns. A read already in progress in that store can still yield an erased id
|
|
128
128
|
from a chunk it had requested before the verb ran: up to 32 chunks for `iterate` and `count`, and up to `concurrency`
|
|
129
|
-
keys (32 by default) for a combine. They are not immediate in any *other* store, in the same process or another, and this library ships nothing that could
|
|
129
|
+
keys (32 by default) for a combine. A combine or `iterate` reads ranges of the object, and resolves the segment again before it serves each chunk, as a read of that chunk alone does, so the ranges it had already requested are dropped, not served. They are not immediate in any *other* store, in the same process or another, and this library ships nothing that could
|
|
130
130
|
make them so — there is no daemon, no bus, and no connection between two stores that happen to point at the same
|
|
131
131
|
bucket.
|
|
132
132
|
|
|
@@ -136,7 +136,7 @@ bucket.
|
|
|
136
136
|
| the store whose verb made the call (`eraseSubject`, `dropSegment`, `retireExpired`) | on return, for every read that starts after it — it invalidates what it cached, and its pins then fail; a read already in progress there can still yield it from a chunk it had requested before |
|
|
137
137
|
| another store, with a registry and a `cache.genTtlMs` above 0 | within `cache.genTtlMs` (default 2 s), when its snapshot re-resolves, **while the registry can be read** (see below) |
|
|
138
138
|
| another store with **no registry** (a bare `IStorageDriver`), with `cache: { genTtlMs: 0 }`, or on a storage source built with **no clock** | **no bound** — only when its caches happen to let the segment go, or something tells it |
|
|
139
|
-
| a pinned handle (`seg.pin()`) in another store | **no bound** — until that store's reader cache evicts the pin's reader and its chunk cache evicts the chunks the pin decoded, or something tells it |
|
|
139
|
+
| a pinned handle (`seg.pin()`) in another store | **no bound** — until that store's reader cache evicts the pin's reader (in a store with a timed pointer refresh, a small generation's reader holds all of its chunks, decoded or not) and its chunk cache evicts the chunks the pin decoded, or something tells it |
|
|
140
140
|
|
|
141
141
|
**An outage of the registry extends that bound.** A refresh that cannot read the row because of a transient fault
|
|
142
142
|
(throttling, a 5xx, a dropped connection) keeps serving the generation the reader already holds, and the key it
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ name.
|
|
|
60
60
|
| Option | What it holds |
|
|
61
61
|
|---|---|
|
|
62
62
|
| `storage` (required) | a backend (see above) |
|
|
63
|
-
| `cache` | `maxChunks`, `genTtlMs` (how soon a reader sees a new load, default 2000 ms), `readerMax`, `readerMaxBytes` |
|
|
63
|
+
| `cache` | `maxChunks`, `ttlMs` (an optional age limit on a cached chunk; omitted, a chunk stays until evicted), `genTtlMs` (how soon a reader sees a new load, default 2000 ms), `readerMax`, `readerMaxBytes` |
|
|
64
64
|
| `encryption` | `{ keystore, required }`: encrypt segments at rest with your own key |
|
|
65
65
|
| `retry` | tune the retry of reads, or `false` to turn it off |
|
|
66
66
|
| `metrics` | a metrics sink; off by default |
|
|
@@ -69,10 +69,12 @@ name.
|
|
|
69
69
|
|
|
70
70
|
## What it costs
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
A cold `intersect` of two 500,000-id segments sharing 100 of their 1,999 chunks is expected to make 6 GETs, **$2.40 per
|
|
73
|
+
million**: counted by running the engine and priced at list, not yet measured on a cloud. On a spread layout it reads more
|
|
74
|
+
bytes than it needs, which cross-region can cost more than the requests it saves. A segment's first `store.load()` is
|
|
75
|
+
**$11.60 per million**, pointer included, from its measured requests at list prices (run of 2026-10-04, in-region, whose
|
|
76
|
+
client had 50 sockets; the client this release builds allows 128, and its effect is not measured). A cold `count()` is one
|
|
77
|
+
pointer read: it reads no payload and no object.
|
|
76
78
|
|
|
77
79
|
The trade is stated plainly. A membership check that misses the cache costs a ranged GET against object storage,
|
|
78
80
|
where an in-process store costs a memory read. If you need sub-millisecond answers on a working set that fits a
|
|
@@ -1993,8 +1993,9 @@ var Segment = class _Segment {
|
|
|
1993
1993
|
/**
|
|
1994
1994
|
* Chunk-skipping intersection: stream the ids in **this** segment AND every segment in `others`, ascending.
|
|
1995
1995
|
* Fetches only the Storage chunks present in *all* operands (a key absent from any operand contributes nothing
|
|
1996
|
-
* and is never downloaded),
|
|
1997
|
-
* (Lambda-friendly) regardless of segment size. Pass `concurrency` to tune that window (
|
|
1996
|
+
* and is never downloaded), reading each operand's as coalesced ranges under a bounded in-flight window — so the Storage
|
|
1997
|
+
* footprint stays small (Lambda-friendly) regardless of segment size. Pass `concurrency` to tune that window (the range
|
|
1998
|
+
* requests held ahead per operand: a positive integer, 32 by default).
|
|
1998
1999
|
* AND is commutative, so `a.intersect([b])` and `b.intersect([a])` yield the same ids. Pass `budget` to
|
|
1999
2000
|
* override the store's per-op denial-of-wallet budget for this call (or `false` to lift it).
|
|
2000
2001
|
*/
|