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

Add export all history command #220

Merged
merged 4 commits into from
Jan 19, 2024
Merged

Add export all history command #220

merged 4 commits into from
Jan 19, 2024

Conversation

chowbao
Copy link
Contributor

@chowbao chowbao commented Jan 18, 2024

Adding temporary command export_all_history to mitigate the high egress costs hitting the history archives.
This combines the export for operations, trades, effects, transactions, and diagnostic events to use only a single captive core instead of each spinning up their own for data export.

TODO: This should be removed as soon as LedgerExporter is complete and a TxMeta datalake is available

@chowbao chowbao requested a review from a team as a code owner January 18, 2024 22:51
Copy link
Contributor

@sydneynotthecity sydneynotthecity left a comment

Choose a reason for hiding this comment

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

Thanks for the speedy turnaround with the changes. Looks like a good enough temporary fix, so I kept the comments to a minimum.

How does the runtime for all history_* exports compare with running a single export command?

cmd/export_all_history.go Outdated Show resolved Hide resolved
}

outFileOperations.Close()
cmdLogger.Info("Number of bytes written: ", totalNumBytes)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we get frequent transient errors, more logging that identifies which file/export process failed might be helpful. Since this is a temp fix, i'll leave it up to you whether that's worthwhile to add.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it's probably not that useful. Any issue would more easily be resolved by running the original pipeline instead of this hack

Co-authored-by: sydneynotthecity <[email protected]>
@chowbao
Copy link
Contributor Author

chowbao commented Jan 19, 2024

How does the runtime for all history_* exports compare with running a single export command?

I didn't run this in prod but in test it adds about 10s - 20s more time (so completes in 40s compared to 20s-30s). I think the runtime ratio will be much better in prod because the part that will benefit the most is the captive core catchup portion

@chowbao chowbao merged commit 3761e4a into master Jan 19, 2024
4 checks passed
@sydneynotthecity sydneynotthecity deleted the add-export-all-command branch July 15, 2024 13:01
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