Skip to content

Commit

Permalink
fix: avoid double db migration when both store and legacy store are m…
Browse files Browse the repository at this point in the history
…ounted
  • Loading branch information
gabrielmer committed Jan 17, 2025
1 parent bfd60ce commit 41f0b33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion waku/factory/node_factory.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 41f0b33

Please sign in to comment.