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

chore: update log progress on network migrations #12732

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

virajbhartiya
Copy link
Member

Closes #12259

Code changes:

  • chain/consensus/filcns/upgrades.go:
    • Updated the ProgressLogPeriod from 5 minutes to 2 seconds in the PreUpgradeActorsV16 function.
    • Updated the ProgressLogPeriod from 10 seconds to 2 seconds in the UpgradeActorsV16 function.
    • Enhanced the Log method in the migrationLogger to provide more detailed logging for migration jobs, including the percentage of jobs completed and the rate of completion.

Documentation changes:

  • documentation/misc/Building_a_network_skeleton.md:
    • Updated the ProgressLogPeriod from 5 minutes to 2 seconds in the migration configuration example.
    • Updated the ProgressLogPeriod from 10 seconds to 2 seconds in another migration configuration example.

@virajbhartiya
Copy link
Member Author

@rvagg is there a way I can run this locally to test it out?

@@ -2998,7 +2999,21 @@ func (ml migrationLogger) Log(level rt.LogLevel, msg string, args ...interface{}
case rt.DEBUG:
log.Debugf(msg, args...)
case rt.INFO:
log.Infof(msg, args...)
if strings.Contains(msg, "jobs created") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit of a hack - how about you just go over and open a PR against go-state-types to change the log message to the one you're printing in this block

@rvagg
Copy link
Member

rvagg commented Nov 28, 2024

Yes, you can run this locally! make lotus-shed and then you can run ./lotus-shed migrate-state 25 CID where CID is a block from a recent tipset, it doesn't matter which block, just grab one of the CIDs from a tipset that's going to be in your blockstore (so within the last couple of days for a splitstore node). Easiest way is to watch the log output, look for New heaviest tipset an pick one of the CIDs in the tipset CID list it prints. This will run the nv25 migration which is the new one we have a skeleton for and will invoke the functions in upgrades.go. Note that you'll need to shut your node down while you run this, it needs exclusive access to the repo.

@virajbhartiya
Copy link
Member Author

Raised a PR in go-state-types @ filecoin-project/go-state-types#329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📌 Triage
Development

Successfully merging this pull request may close these issues.

Log progress on network migrations
2 participants