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: performance optimization in "op-batcher" #13584

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

avorylli
Copy link

@avorylli avorylli commented Jan 4, 2025

Benefits of the Changes

These updates make the system more reliable by providing:

  • Better tracking of transaction states:

    • Improved monitoring of transaction attempts and status.
  • Faster problem detection:

    • Early identification of stuck transactions.
  • Automatic cleanup of stuck transactions:

    • Prevents manual intervention for resolving issues.
  • Prevention of problematic transaction accumulation:

    • Keeps the system clean and efficient by avoiding buildup.

Added a transaction tracking mechanism:

1) New txTracker structure for storing information about sending attempts:
- Tracks the time of the first and last attempt.
- Counts the number of send attempts.

2) Improved logic for clearing stuck transactions:

- A transaction is considered stuck after 3 attempts or 5 minutes of waiting.
- Automatic cleanup of old records every 30 seconds.
- More informative logging of problematic transactions.

3) Integration with the existing cancellation mechanism:

- Utilizes the existing cancelBlockingTx for cleanup.
- Retains information about the transaction type (blob/non-blob).
- Ensures proper handling of the transaction queue.
@avorylli avorylli requested review from a team as code owners January 4, 2025 15:28
@avorylli avorylli requested a review from axelKingsley January 4, 2025 15:28
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.

1 participant