Problem
An update that leaves a secondary index column unchanged still performs remove+insert for that index (2 writes per index instead of 0). The writes are correct — the entry is the same before and after — so this is an optimization opportunity, not a correctness defect.
Proposed solution
Compare extracted old vs new indexed values per field in the KV secondary-index update path; when equal, skip both remove and insert for that index. Changed values keep the existing remove+insert behavior.
Engine / area
Key-Value (secondary indexes).
Alternatives & workarounds
None needed; current behavior is correct, just wasteful.
Before submitting
Problem
An update that leaves a secondary index column unchanged still performs remove+insert for that index (2 writes per index instead of 0). The writes are correct — the entry is the same before and after — so this is an optimization opportunity, not a correctness defect.
Proposed solution
Compare extracted old vs new indexed values per field in the KV secondary-index update path; when equal, skip both remove and insert for that index. Changed values keep the existing remove+insert behavior.
Engine / area
Key-Value (secondary indexes).
Alternatives & workarounds
None needed; current behavior is correct, just wasteful.
Before submitting