Repository navigation
v0.20.0
@kitcn/resend
Published @kitcn/resend@0.20.0.
kitcn
Minor Changes
-
#337
5d3172bThanks @MikeyZhang75! - ## Breaking changes- Range-filtered
count()andaggregate()now stop ataggregateWorkBudget
work units and throwCOUNT_FILTER_UNSUPPORTED/
AGGREGATE_FILTER_UNSUPPORTEDnaming the index, instead of reading the whole
equality prefix and failing on Convex's transaction read limit. Bucket scans
cost one unit;_minand_maxalso reserve one extrema read per matching
bucket. One budget covers everyINprefix and extrema metric sharing the
range plan. Raise it cautiously if a wide range scan is intentional.
// Before export default defineSchema({ runs }); // After export default defineSchema( { runs }, // Keep headroom below Convex's 32,000-document transaction ceiling. { defaults: { aggregateWorkBudget: 20_000 } } );
Features
kitcn aggregate rebuildand index pruning clear stored aggregate state in
scheduled batches, so rebuilding or dropping anaggregateIndex/rankIndex
on a large table no longer has to fit in a single Convex mutation. Indexes
report aCLEARINGstatus while draining, andkitcn aggregate prunereports
how many removed indexes are still being cleared in the background.- ORM writes targeting a declared index in
CLEARINGfail before the document
write. Retry after the index advances toBUILDINGorREADY; this prevents
concurrent writes from being erased by a multi-mutation clear. - Automatic pruning follows canonical aggregate lifecycle state instead of
reverse-scanning every distinct backing-table index. ExacttableNameand
indexNamehandler arguments retain bounded recovery for state-less storage.
Patches
- Reduce database reads per rank-index write: the btree descent no longer
re-queries the tree document at every node, re-reads nodes it just wrote, or
re-reads the child it descends into. - Reduce database reads for
rank().min(),rank().max()andrank().random()
by dropping a redundant count scan per call. - Reduce document writes during aggregate backfill: a page of rows sharing a key
tuple now writes its bucket once instead of once per row. - Stop writing
aggregate_memberrows when a mutation changes no aggregated
field. - Improve
count()andaggregate()latency for multi-valueINfilters and
for_min/_maxby issuing independent bucket reads through a bounded pool. - Keep a partially cleared index in
CLEARINGwhen an error interrupts a
rebuild, so a retry resumes clearing instead of building over stale buckets.
- Range-filtered