-
Notifications
You must be signed in to change notification settings - Fork 42
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
11 to 12: Improvements to migration #145
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,12 +67,7 @@ func (cswap *CidSwapper) Revert(unswapCh <-chan Swap) (uint64, error) { | |
swapWorkerFunc := func() (uint64, uint64) { | ||
return cswap.unswapWorker(unswapCh) | ||
} | ||
// We only run 1 worker for revert. Migrations | ||
// many-cid-to-one-multihash mappings, but reverts can have the | ||
// opposite. The unswapWorker keeps a cache to handle that, but | ||
// this only works with a single worker. Otherwise we'd need | ||
// complex syncing, or delayed removal (increased datastore size). | ||
return cswap.runWorkers(1, swapWorkerFunc) | ||
return cswap.runWorkers(NWorkers, swapWorkerFunc) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From @hsanjuan: The logic for why we only needed 1 worker is not true anymore. Before we kept track of whether a reverted block had a v0 reference so we did not delete the v0... but now we don't delete anything on revert. |
||
} | ||
|
||
// Run workers launches several workers to run the given function which returns | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reliance on a non-tagged commit shouldn't hurt us here since we're using vendoring, right?