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:
References
Context
Raised as a suggestion in #4669, which converted all five production call sites from
UpserttoUpdate.After that PR,
Upserthas zero production callers in the session manager. The only remaining references are test fixtures seeding storage state, which can useCreateor direct setup helpers instead.Problem
Keeping
Upsertin theDataStorageinterface 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
Upsertfrom theDataStorageinterface entirely:UpsertfromDataStorageinpkg/transport/session/session_data_storage.goUpsertimplementations inRedisSessionDataStorageandLocalSessionDataStorageUpsertto useCreateor direct setup helpers insteadReferences