Skip to content
IJK

etcd v3.7.0: Keys-Only Reads From the In-Memory Index

By IJK ·

What the etcd v3.7.0 announcement says changes for keys_only Range requests and the one case that still loads values from bbolt.

What a keys_only request reads

When processing a keys_only Range request or etcdctl get --keys-only, etcd reads solely from its in-memory index. [1]

It returns the matched keys without loading all serialized values from bbolt as it did previously. [2]

The exception

The only exception where loading from bbolt is still required is when keys_only Range requests must be sorted by value (i.e., when SortTarget is set to VALUE). [3]

only when sorted by valuekeys_only Range requestor etcdctl get --keys-onlyIn-memory indexkeys returned without loading values from bboltbboltstill loaded when sorting by value
What does a keys_only request touch in v3.7.0?

What it means for large ranges

This reduces unnecessary backend reads and memory use for workloads that only need key names, making large keys-only range requests more efficient. [4]

Sources

  1. The etcd source says: When processing a keys_only Range request or etcdctl get --keys-only, etcd reads solely from its in-memory index. Announcing etcd v3.7.0
  2. The etcd source says: It returns the matched keys without loading all serialized values from bbolt as it did previously. Announcing etcd v3.7.0
  3. The etcd source says: The only exception where loading from bbolt is still required is when keys_only Range requests must be sorted by value (i.e., when SortTarget is set to VALUE). Announcing etcd v3.7.0
  4. The etcd source says: This reduces unnecessary backend reads and memory use for workloads that only need key names, making large keys-only range requests more efficient. Announcing etcd v3.7.0

Editorial (AI-assisted; automatically checked, not human-reviewed). Each statement is linked to its source; check the source before relying on a detail.

  • etcd
  • kubernetes
  • databases
  • performance