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

[Consensus] refine logging & small timeout changes #18795

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

akichidis
Copy link
Contributor

@akichidis akichidis commented Jul 25, 2024

Description

  • Increase timeout when waiting for consensus to start from 30s -> 60s. Came across cases where commit recovery was taking a bit longer and might make sense to have a bit more tolerance.
  • Add more logs in consensus components and switch them to info - it's ok since those should be printed once per epoch
  • Make the consensus protocol choice log a debug . The method get_consensus_protocol_in_epoch is now being used from get_max_accumulated_txn_cost_per_object_in_commit which is called on every sequenced transaction leading to a very spammy log output:
Screenshot 2024-07-25 at 11 37 09

Test plan

How did you test the new or updated feature?


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented Jul 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 9:05pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jul 25, 2024 9:05pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Jul 25, 2024 9:05pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Jul 25, 2024 9:05pm

Copy link
Member

@mwtian mwtian left a comment

Choose a reason for hiding this comment

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

Nice!

@@ -121,7 +121,7 @@ impl CommitObserver {
.scan_commits(((last_processed_commit_index + 1)..=CommitIndex::MAX).into())
.expect("Scanning commits should not fail");

debug!("Recovering commit observer after index {last_processed_commit_index} with last commit {:?} and {} unsent commits", last_commit, unsent_commits.len());
info!("Recovering commit observer after index {last_processed_commit_index} with last commit {:?} and {} unsent commits", last_commit, unsent_commits.len());
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
info!("Recovering commit observer after index {last_processed_commit_index} with last commit {:?} and {} unsent commits", last_commit, unsent_commits.len());
info!("Recovering commit observer after index {last_processed_commit_index} with last commit {} and {} unsent commits", last_commit.index(), unsent_commits.len());

@@ -144,6 +144,7 @@ impl CommitObserver {
vec![]
};

info!("Sending commit {:?} during recovery", commit.index());
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
info!("Sending commit {:?} during recovery", commit.index());
info!("Sending commit {} during recovery", commit.index());

@akichidis akichidis enabled auto-merge (squash) July 25, 2024 21:27
@akichidis akichidis merged commit d1efa1c into main Jul 25, 2024
48 checks passed
@akichidis akichidis deleted the akichidis/refine-log-messages branch July 25, 2024 21:29
suiwombat pushed a commit that referenced this pull request Sep 16, 2024
## Description 

* Increase timeout when waiting for consensus to start from `30s ->
60s`. Came across cases where commit recovery was taking a bit longer
and might make sense to have a bit more tolerance.
* Add more logs in consensus components and switch them to `info` - it's
ok since those should be printed once per epoch
* Make the consensus protocol choice log a `debug` . The method
`get_consensus_protocol_in_epoch` is now being used from
`get_max_accumulated_txn_cost_per_object_in_commit` which is called on
every sequenced transaction leading to a very spammy log output:

<img width="1459" alt="Screenshot 2024-07-25 at 11 37 09"
src="https://github.com/user-attachments/assets/4971ae31-c033-46f6-bd16-bb6c4052640d">



## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
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.

3 participants