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]
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
- 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
- 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
- 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
- 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