Skip to content

Fix nested read migration transactions - #2630

Merged
Widthdom merged 3 commits into
mainfrom
codex/fix-issue2607
May 24, 2026
Merged

Fix nested read migration transactions#2630
Widthdom merged 3 commits into
mainfrom
codex/fix-issue2607

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Avoid starting a nested SQLite transaction when TryMigrateForRead is invoked inside an already-active transaction.
  • Preserve the existing degraded migration behavior for read-only/open failures.
  • Add regression coverage for the existing-transaction path.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~DatabaseTests.TryMigrateForRead_InsideExistingTransaction_DoesNotStartNestedTransaction|FullyQualifiedName~ConcurrencyTests.GetRepoMap_FreshnessAndEntrypointsStaySnapshotConsistent_UnderConcurrentWriter|FullyQualifiedName~LegacySchemaMigrationTests.TryMigrateForRead_PartialDdlFailure_RecordsStepAndEmitsActionableWarning" -p:UseSharedCompilation=false
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • git diff --check origin/main..HEAD
  • dotnet test CodeIndex.sln -p:UseSharedCompilation=false on latest merged origin/main: net8 passed; net9 failed in QueryCommandRunnerTests.RunPublishedTrimmedCli_SearchSupportsCSharpRazorAliases(lang: "cshtml") due the known macOS arm64 ILLink AccessViolation tracked by macOS arm64 trimmed publish test can crash in ILLink #2606.
  • Adversarial review: No blocking/actionable issues found.

Documentation and Changelog

  • Added changelog.d/unreleased/2607.fixed.md.
  • No docs changes were needed; the fix preserves the existing read-migration contract.

Follow-up Candidates

  • None.

Fixes #2607

@Widthdom
Widthdom merged commit 9406955 into main May 24, 2026
10 checks passed
@Widthdom
Widthdom deleted the codex/fix-issue2607 branch May 24, 2026 12:52
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.

Concurrent freshness snapshot test can hit nested SQLite transaction

1 participant