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: run more backfill tipsetkey during import chain #1222

Merged
merged 7 commits into from
Jun 6, 2023

Conversation

Terryhung
Copy link
Collaborator

No description provided.

@Terryhung Terryhung marked this pull request as ready for review June 6, 2023 06:02
commands/init.go Outdated
Name: "backfill-tipsetkey-range",
Usage: "Determine the extent of backfilling from the head.",
EnvVars: []string{"LILY_BACKFILL_TIPSETKEY_RANGE"},
Value: 1800,
Copy link
Contributor

Choose a reason for hiding this comment

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

our snapshot range is 2890 epochs. Should we make the default something like 3000 or 3600 to ensure we always backfill more than a day?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed

@@ -189,6 +190,11 @@ func ImportChain(ctx context.Context, r repo.Repo, fname string, snapshot bool)
return fmt.Errorf("importing chain failed: %w", err)
}

err = backfillMoreEpochsForTipsetKey(ctx, ts, cst, backfillTipsetkeyRange)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add comment to explain cst.Import() only backfills 1800 epochs.
Make the name shorter backfillTipsetKey .

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added more comment!

@@ -189,6 +190,14 @@ func ImportChain(ctx context.Context, r repo.Repo, fname string, snapshot bool)
return fmt.Errorf("importing chain failed: %w", err)
}

// The cst.Import function will only backfill 1800 epochs of tipsetkey,
// as determined by the value specified in TipsetkeyBackfillRange.
Copy link
Contributor

Choose a reason for hiding this comment

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

this line might be confusing since we have backfillTipsetKeyRange. No need to mention the variable in cst.import.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

@Terryhung Terryhung merged commit bdf1d1c into master Jun 6, 2023
@Terryhung Terryhung deleted the terryhung/fix-import-chain branch June 6, 2023 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants