Skip to content

refactor(storage): make database creation cancellable - #117

Merged
pablontiv merged 2 commits into
mainfrom
refactor/storage-open-context
Oct 7, 2026
Merged

pablontiv merged 2 commits into
mainfrom
refactor/storage-open-context

Conversation

@pablontiv

Copy link
Copy Markdown
Owner

Related to #48 — final storage phase.

Summary

  • adds OpenContext while preserving Open as the context.Background() wrapper
  • initializes new V1–V16 databases atomically in one transaction with cancellation-safe rollback and cleanup
  • linearizes publication at the canonical hard link so concurrent openers adopt exactly one complete database
  • propagates context through private creation, connection checks, publication, and recovery destination construction
  • preserves existing-database migration behavior and wrapper compatibility

Validation

  • just ci — pass, 85.3% total coverage
  • go test -race -count=1 ./internal/storage — pass
  • focused deterministic cancellation, rollback, publication, concurrency, permissions, URI, and recovery tests — pass
  • review candidate accepted after the publication ownership race fix and equivalent rebase onto current main

@pablontiv
pablontiv merged commit 0ca3870 into main Oct 7, 2026
14 checks passed
@pablontiv
pablontiv deleted the refactor/storage-open-context branch October 7, 2026 12:03
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