Skip to content

fix: preserve concurrent prefix updates - #135

Open
vycdev2 wants to merge 1 commit into
vycdev:developfrom
vycdev2:fix/preserve-concurrent-prefix-update-20260811
Open

fix: preserve concurrent prefix updates#135
vycdev2 wants to merge 1 commit into
vycdev:developfrom
vycdev2:fix/preserve-concurrent-prefix-update-20260811

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • prevent an in-flight prefix database lookup from overwriting a newer cached prefix set by an administrator
  • add a deterministic regression test that pauses the database query while the cache is updated

Verification

  • dotnet test Morpheus.Tests/Morpheus.Tests.csproj --filter FullyQualifiedName~GuildPrefixServiceTests --logger 'console;verbosity=minimal' — passed: 1/1 (the regression failed against the unchanged implementation with old! instead of new!)
  • dotnet build — passed with 0 errors; 2 existing NU1903 warnings for SQLitePCLRaw.lib.e_sqlite3 2.1.6
  • dotnet test --no-build --logger 'console;verbosity=minimal' — passed: 429, skipped: 1, failed: 0
  • git diff --check — passed

Risk

  • Low: the cache now keeps an entry written while an asynchronous database lookup is in flight; normal cache misses and explicit updates retain their existing behavior.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant