Skip to content

Commit

Permalink
chore: rename migration progress log timeout function to period and u…
Browse files Browse the repository at this point in the history
…pdate related error messages
  • Loading branch information
virajbhartiya committed Dec 12, 2024
1 parent 773a251 commit 5e62a5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions chain/consensus/filcns/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2754,9 +2754,9 @@ func PreUpgradeActorsV16(ctx context.Context, sm *stmgr.StateManager, cache stmg
return xerrors.Errorf("error getting lookback ts for premigration: %w", err)
}

timeoutDuration, err := getMigrationProgressLogTimeout()
timeoutDuration, err := getMigrationProgressLogPeriod()
if err != nil {
return xerrors.Errorf("error getting progress log timeout: %w", err)
return xerrors.Errorf("error getting progress log period: %w", err)
}

config := migration.Config{
Expand All @@ -2776,9 +2776,9 @@ func UpgradeActorsV16(ctx context.Context, sm *stmgr.StateManager, cache stmgr.M
workerCount = 1
}

timeoutDuration, err := getMigrationProgressLogTimeout()
timeoutDuration, err := getMigrationProgressLogPeriod()
if err != nil {
return cid.Undef, xerrors.Errorf("error getting progress log timeout: %w", err)
return cid.Undef, xerrors.Errorf("error getting progress log period: %w", err)
}

config := migration.Config{
Expand Down Expand Up @@ -3017,7 +3017,7 @@ func (ml migrationLogger) Log(level rt.LogLevel, msg string, args ...interface{}
}
}

func getMigrationProgressLogTimeout() (time.Duration, error) {
func getMigrationProgressLogPeriod() (time.Duration, error) {
timeoutDuration := time.Second * 2 // default timeout
timeout := os.Getenv("LOTUS_MIGRATE_PROGRESS_LOG_SECONDS")
if timeout != "" {
Expand Down
8 changes: 4 additions & 4 deletions documentation/misc/Building_a_network_skeleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,9 @@ Typically it's safe to not upgrade filecoin-ffi's version of go-state-types. Th
return xerrors.Errorf("error getting lookback ts for premigration: %w", err)
}
timeoutDuration, err := getMigrationProgressLogTimeout()
timeoutDuration, err := getMigrationProgressLogPeriod()
if err != nil {
return xerrors.Errorf("error getting progress log timeout: %w", err)
return xerrors.Errorf("error getting progress log period: %w", err)
}
config := migration.Config{
Expand All @@ -478,9 +478,9 @@ Typically it's safe to not upgrade filecoin-ffi's version of go-state-types. Th
workerCount = 1
}
timeoutDuration, err := getMigrationProgressLogTimeout()
timeoutDuration, err := getMigrationProgressLogPeriod()
if err != nil {
return cid.Undef, xerrors.Errorf("error getting progress log timeout: %w", err)
return cid.Undef, xerrors.Errorf("error getting progress log period: %w", err)
}
config := migration.Config{
Expand Down

0 comments on commit 5e62a5f

Please sign in to comment.