Skip to content

Elide redundant secondary-index rewrites on identical in-place updates #279

Description

@EnRaiha

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

  • I searched existing issues and discussions for this proposal.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    engine:kvKey-Value enginepriority:P3Backlog / somedaytype:choreBuild, CI, refactor, or maintenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions