Skip to content

[refactor] Remove three unused exported *Tx helpers in pkg/store/relations.go #222

Description

@radimsem

Summary

Three exported transaction-scoped helpers in pkg/store/relations.go have zero callers anywhere in the repository (production or tests). They are dead public API that ships forever, and they obscure which path is "real" for relation writes.

Location

  • pkg/store/relations.go:61UpsertRelationTx
  • pkg/store/relations.go:77InsertPendingRelationTx
  • pkg/store/relations.go:93DeletePendingByIDTx

Category

refactor (dead code)

Impact

Medium — small in lines, but every unused exported method is a future-maintenance trap and a Karpathy-style "code that looks useful but isn't." Easy to delete.

Rationale

Verified with grep -rn 'UpsertRelationTx|InsertPendingRelationTx|DeletePendingByIDTx' --include='*.go': every match is the definition site itself. By contrast, DeleteParsedPendingForSourceTx (line 103) and the Node*Tx family in pkg/store/node.go are actually used (e.g. by rollback.go), so the symmetry argument doesn't justify keeping the three orphans.

Suggested direction

Delete the three functions. If a future tx-aware caller appears, reintroduce at that point. Mechanical change, ~30 lines removed.

Filed by the nightly enhancement-scanner routine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-reviewFiled by the nightly enhancement-scanner routinerefactorCode refactoring / architecture cleanup

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions