Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid double db migration for sqlite #3244

Merged
merged 4 commits into from
Jan 20, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: avoid double db migration when both store and legacy store are m…
…ounted
gabrielmer committed Jan 17, 2025

Verified

This commit was signed with the committer’s verified signature.
agnesLeroy Agnès Leroy
commit 41f0b33c7f4f3fb519cc29ab642e6c2d7837d353
3 changes: 2 additions & 1 deletion waku/factory/node_factory.nim
Original file line number Diff line number Diff line change
@@ -267,8 +267,9 @@ proc setupProtocols(
## then the legacy will be in charge of performing the archiving.
## Regarding storage, the only diff between the current/future archive driver and the legacy
## one, is that the legacy stores an extra field: the id (message digest.)
let migrate = if conf.legacyStore: false else: conf.storeMessageDbMigration
let archiveDriverRes = waitFor driver.ArchiveDriver.new(
conf.storeMessageDbUrl, conf.storeMessageDbVacuum, conf.storeMessageDbMigration,
conf.storeMessageDbUrl, conf.storeMessageDbVacuum, migrate,
conf.storeMaxNumDbConnections, onFatalErrorAction,
)
if archiveDriverRes.isErr():