Skip to content

Remove Upsert from DataStorage interface — no production callers remain after #4669 #4726

Closed

Description

@yrobla

Context

Raised as a suggestion in #4669, which converted all five production call sites from Upsert to Update.

After that PR, Upsert has zero production callers in the session manager. The only remaining references are test fixtures seeding storage state, which can use Create or direct setup helpers instead.

Problem

Keeping Upsert in the DataStorage interface risks future contributors accidentally reintroducing the unconditional-write pattern that #4669 was specifically designed to eliminate. An unused interface method is a footgun with no upside.

Suggestion

Remove Upsert from the DataStorage interface entirely:

  • Remove Upsert from DataStorage in pkg/transport/session/session_data_storage.go
  • Remove or replace Upsert implementations in RedisSessionDataStorage and LocalSessionDataStorage
  • Update test fixtures that call Upsert to use Create or direct setup helpers instead
  • Verify no remaining callers exist outside of tests

References

Activity

  1. added
    scalability
    on Apr 10, 2026
  2. added
    enhancement
    go
    and removed
    scalability
    on Apr 10, 2026
  3. reopened this on Apr 13, 2026
  4. added 2 commits that reference this issue on Apr 14, 2026
    c831fbd
    1f9883d
  5. self-assigned this
    on Apr 14, 2026
  6. added a commit that references this issue on Apr 15, 2026
    5e1e1d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreenhancementgo

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions