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

Update asset registration to merge on conflict #268

Merged
merged 1 commit into from Feb 15, 2023

Conversation

adamiak
Copy link
Member

@adamiak adamiak commented Feb 14, 2023

When state update is halted half-way and backend is restarted, it restarts syncing from last synced block. But since some asset registrations have already gone to the DB in the previous, halted run, they cause unique constraint violation.

Even though I see merit in adding blockNumber and timestamp with proper rollback support for asset registrations, for now I opt for a quick solution of adding onConflict().merge() and revisiting it in the future.

This is needed when syncing restarts from earlier block, e.g. when state update was interrupted
@adamiak adamiak merged commit bd81eee into master Feb 15, 2023
@adamiak adamiak deleted the fix-asset-registration-reorg branch February 15, 2023 08:44
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

3 participants