GitBulletin

Repository: farcasterxyz/hub-monorepo

"Tech Breakthrough: Hubble Triumphs Over RocksDB Instantiation Challenges!"

2024-03-26 02:14:39 UTC

"Groundbreaking fixes prevent zero-message snapshots and enhance data integrity in the realms of cutting-edge database management."

Commit Details:

fix: handle edge cases of rocksdb instantiation (#1844) ## Motivation - There were certain edge cases in instantiation that could cause snapshots to be uploaded with 0 messages - If snapshot flag is enabled but zero messages are found, we now return an error - path checks for trie db uses normalized paths and properly checks in cases where there's prefix of `.rocks` - If the trie DB directory exists, but hasn't loaded any messages yet, we catch the error in getting root node and return 0 ## Change Summary - If snapshot flag is enabled but zero messages are found, we now return an error - path checks for trie db uses normalized paths and properly checks in cases where there's prefix of `.rocks` - If the trie DB directory exists, but hasn't loaded any messages yet, we catch the error in getting root node and return 0 ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [x] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. - [x] All [commits have been signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits) ## Additional Context If this is a relatively large or complex change, provide more details here that will help reviewers <!-- start pr-codex --> --- ## PR-Codex overview The focus of this PR is to enhance the `hubble` app by handling edge cases of rocksdb instantiation for snapshot uploads. ### Detailed summary - Handle edge cases of rocksdb instantiation for snapshot uploads in `hubble` - Synchronously fetch the number of elements in the trie DB - Throw an error if message count is not obtained for snapshot upload - Support catch up sync with snapshot only on mainnet - Improve logging for catchup sync using snapshot - Refactor trie database instantiation for consistency and error handling > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->

Search Similar