Skip to content

clear initialization SQL after running it on the async prepare path - #492

Merged
SergeiPavlov merged 1 commit into
master-servicetitanfrom
clear-init-scripts
Jul 30, 2026
Merged

clear initialization SQL after running it on the async prepare path#492
SergeiPavlov merged 1 commit into
master-servicetitanfrom
clear-init-scripts

Conversation

@dagreen-st

Copy link
Copy Markdown
Collaborator

PrepareAsync executed the queued initialization scripts but never drained
the queue, so every later transaction in the same session re-ran all
previously registered scripts. Add initializationSqlScripts.Clear() to
match the existing Prepare() method.

Adds an async regression test that registers the same script each outer
transaction and asserts it executes exactly once per transaction.

PrepareAsync executed the queued initialization scripts but never drained
the queue, so every later transaction in the same session re-ran all
previously registered scripts. Add initializationSqlScripts.Clear() to
match the existing Prepare() method.

Adds an async regression test that registers the same script each outer
transaction and asserts it executes exactly once per transaction.
@dagreen-st

Copy link
Copy Markdown
Collaborator Author

issue discovered by @botinko

relates to servicetitan/app#139430

Comment thread Orm/Xtensive.Orm/Orm/Providers/SqlSessionHandler.cs
@SergeiPavlov
SergeiPavlov merged commit 0b53fcc into master-servicetitan Jul 30, 2026
88 checks passed
@SergeiPavlov
SergeiPavlov deleted the clear-init-scripts branch July 30, 2026 16:23
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.

3 participants