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
Build and Push Docker Image / build (push) Successful in 7m38s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user