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: improve rollback mechanism #4

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

cyphersnake
Copy link
Owner

This commit refactors the event_reader_service.rs file by introducing a new
Rollback enum and modifying the resync_rollback field in the EventsReader struct to use this enum. The Rollback enum is used to specify different
types of rollbacks, including None, Beginning, and Signature. The res ync_rollback field is now of type Arc<RwLock<Rollback>>.

Additionally, a new method reset_last_resynced_transaction is added to the
ResyncedTransactionsPtrStorage trait and implemented for the rocksdb module
. This method allows resetting the last resynced transaction for a specific
program ID.

These changes improve the clarity and maintainability of the codebase.

@cyphersnake cyphersnake requested a review from b33ngo June 28, 2023 13:03
@cyphersnake cyphersnake self-assigned this Jun 28, 2023
@cyphersnake cyphersnake enabled auto-merge (rebase) October 7, 2023 03:22
This commit refactors the `event_reader_service.rs` file by introducing a new
 `Rollback` enum and modifying the `resync_rollback` field in the `EventsReader
` struct to use this enum. The `Rollback` enum is used to specify different
 types of rollbacks, including `None`, `Beginning`, and `Signature`. The `res
ync_rollback` field is now of type `Arc<RwLock<Rollback>>`.

Additionally, a new method `reset_last_resynced_transaction` is added to the
 `ResyncedTransactionsPtrStorage` trait and implemented for the `rocksdb` module
. This method allows resetting the last resynced transaction for a specific
 program ID.

These changes improve the clarity and maintainability of the codebase.
@cyphersnake cyphersnake force-pushed the improve-rollback-mechanism branch from af95f34 to fd0fb54 Compare October 9, 2023 11:09
@cyphersnake cyphersnake merged commit 18c728d into master Oct 9, 2023
3 checks passed
@cyphersnake cyphersnake deleted the improve-rollback-mechanism branch October 9, 2023 11:10
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