Skip to content

Add missing query CleanupDefunctSiloEntriesKey to PostgreSQL-Clustering - #9125

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
tomaszstrejczek:main
Aug 10, 2026
Merged

ReubenBond merged 2 commits into
dotnet:mainfrom
tomaszstrejczek:main

Conversation

@tomaszstrejczek

@tomaszstrejczek tomaszstrejczek commented Aug 25, 2024 •

Copy link
Copy Markdown

Solves #8676 for PostgreSQL scripts by adding missing query CleanupDefunctSiloEntriesKey.
Follows the same pattern as #8896.

Microsoft Reviewers: Open in CodeFlow

@tomaszstrejczek

tomaszstrejczek commented Oct 11, 2024 via email

Copy link
Copy Markdown
Author

@NSTA2

NSTA2 commented Feb 4, 2025

Copy link
Copy Markdown
Contributor

I'm still experiencing this issue with the postgres clustering provider - presumably because it looks like this PR hasn't completed yet.
I've applied the relevant Sql command to my database manually as an interim workaround (Will this complete soon @ReubenBond ?)
Many Thanks

@ReubenBond

Copy link
Copy Markdown
Member

This change seems to break the MySQL & MS SQL tests

Comment thread test/Extensions/TesterAdoNet/RelationalUtilities/RelationalStorageForTesting.cs Outdated
@ReubenBond

Copy link
Copy Markdown
Member

I reverted the change to RelationalStorageForTesting.cs. It wasn't clear to me how it's a necessary part of this PR

@ReubenBond

Copy link
Copy Markdown
Member

Ok, it's because it was in the migrations directory. The idea is to run the base script and then the migration scripts in order. In this PR, you're merging a migration script back into the base script. That is OK by me, but we need to decide how to handle the migration script either by making them idempotent or by suppressing them from tests. The previous change to suppress them suppressed them for Postgres and the other providers, which caused other providers to fail.

@Shumozavr

Copy link
Copy Markdown

Up on this. It's really strange that 100% of users who'll start with orleans + adonet clustering will encounter this problem, and it's still not fixed.

@InCerryGit

Copy link
Copy Markdown

same issue.

@crashkonijn

Copy link
Copy Markdown

I just had this exact same issue when trying out Orleans for the first time. Manually adding this addition fixed the issues I had.

Copilot AI lite review requested due to automatic review settings August 10, 2026 14:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the missing CleanupDefunctSiloEntriesKey stored query to the PostgreSQL ADO.NET clustering schema script so Orleans can load all required queries at startup (aligning PostgreSQL with the prior MySQL fix in #8896).

Changes:

  • Adds an INSERT INTO OrleansQuery entry for CleanupDefunctSiloEntriesKey in the PostgreSQL clustering script.
Show a summary per file
File Description
src/AdoNet/Orleans.Clustering.AdoNet/PostgreSQL-Clustering.sql Adds the missing CleanupDefunctSiloEntriesKey query definition to complete the PostgreSQL clustering query set.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ReubenBond

Copy link
Copy Markdown
Member

Addressed in b00de17. The PostgreSQL 3.7 clustering migration now uses ON CONFLICT (QueryKey) DO NOTHING, so upgrades still add the missing query while fresh schema setup can safely execute the base script followed by the migration without a duplicate primary-key failure. The existing PostgreSQL provider test setup concatenates the base and migration scripts, so the provider CI exercises this exact sequence.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants