v1.2.0: skip unchanged writes, transactional schema/root counters, snapshot replay for meta:events 0-0 (drops boot republish), collect-once search driver
Build and Push Docker Image / build (push) Successful in 7m38s

This commit is contained in:
Worph
2026-10-19 21:41:55 +00:00
parent dc5cbdfb9b
commit fb4bdad61b
21 changed files with 897 additions and 540 deletions
+5 -3
View File
@@ -4,8 +4,9 @@ import (
"time"
)
// CountRoots returns the number of metadata roots in the root index — one
// range count over idx:roots/, never the list itself.
// CountRoots returns the number of metadata roots: a counter the write path
// keeps exact (see onChange), so it costs one read — search reports it as
// `total` on every query.
func (c *Client) CountRoots() (int64, error) {
s, err := c.kv()
if err != nil {
@@ -13,7 +14,8 @@ func (c *Client) CountRoots() (int64, error) {
}
ctx, cancel := opCtx()
defer cancel()
return s.Count(ctx, rootsNS)
n, _, err := s.Counter(ctx, rootsCountKey)
return n, err
}
// keyCountTTL bounds how stale CountKeys may be. Counting every row is a full