-
Notifications
You must be signed in to change notification settings - Fork 28
fix: Incorrect error reporting (leader timeout) #1324
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
base: main
Are you sure you want to change the base?
fix: Incorrect error reporting (leader timeout) #1324
Conversation
WalkthroughUpdates consensus handling in Changes
Sequence Diagram(s)sequenceDiagram
participant TP as TransactionsProcessor
participant CM as ConsensusModule
participant DB as Database
Note over TP: _process_result(consensus_data)
alt consensus_data contains "votes"
TP->>TP: votes_values = list(consensus_data["votes"].values())
TP->>TP: normalized_votes = [str(v).lower() for v in votes_values]
alt votes_values is empty
TP->>TP: consensus_result = ConsensusResult.TIMEOUT
else votes present
TP->>CM: determine_consensus_from_votes(normalized_votes)
CM-->>TP: consensus_result
end
else consensus_data present without "votes"
TP->>TP: consensus_result = ConsensusResult.NO_MAJORITY
end
TP->>DB: Save result (result = int(consensus_result), result_name = consensus_result.value)
DB-->>TP: Ack
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1){backend,examples,tests}/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧬 Code graph analysis (1)backend/database_handler/transactions_processor.py (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Fixes #DXP-646
What
Updated the
transactions_processor.pyto handle consensus results more robustly by adding checks for empty votes which means leader timeout.Why
To fix a bug where transactions with no votes was marked as no_majority instead of leader_timeout.
Testing done
Decisions made
Checks
Reviewing tips
Focus on the changes.
User facing release notes
Improved handling of consensus results in transaction processing.
Summary by CodeRabbit