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

feat: add indexer metadata table + model #17

Closed
wants to merge 3 commits into from

Conversation

cwkang1998
Copy link
Collaborator

Add metadata table to allow indexer to track indexing progress and
schedule backfilling tasks

@cwkang1998 cwkang1998 changed the base branch from main to sepolia-db December 4, 2024 11:01
@cwkang1998 cwkang1998 force-pushed the feat/indexer-metadata branch from 323fc22 to c99f6e1 Compare December 4, 2024 11:03
@cwkang1998 cwkang1998 marked this pull request as ready for review December 10, 2024 07:40
async fn set_is_backfilling(&self, is_backfilling: bool) -> Result<(), ModelError> {
let result = sqlx::query(
r#"
UPDATE indexer_metadata
Copy link
Collaborator

Choose a reason for hiding this comment

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

In all this UPDATE are you not using WHERE intentionally? Without it seems that you want to update all the rows on the table?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in this case, yes. Since there can only (and should only) be one row for this table, this should be acceptable.

If you foresee some cases where this might be held false, do tell me about it.

Add metadata table to allow indexer to track indexing progress and
schedule backfilling tasks
@cwkang1998 cwkang1998 force-pushed the feat/indexer-metadata branch from c99f6e1 to 60bdaca Compare December 13, 2024 10:04
@ametel01
Copy link
Collaborator

LGTM, just need to make the CI check pass

@cwkang1998
Copy link
Collaborator Author

Due to some changes to the code, closing this.

@cwkang1998 cwkang1998 closed this Dec 23, 2024
@cwkang1998 cwkang1998 deleted the feat/indexer-metadata branch January 9, 2025 07:48
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.

None yet

2 participants