ChainSafe / ChainSafe/forest

Add names to Tokio tasks

Open
#2,382 0 comments 0 reactions 0 assignees View on GitHub
Node Priority: 4 - Low Type: Enhancement
Dominant language
Rust
Stars
697
Forks
200
Avg merge
1d 5h
Merged PRs (30d)
65

Description

**Issue summary**

Now that Forest is using tokio runtime we would like to improve debuggability thanks to naming tasks.

A proposal would be to prefix the name with the epoch at which the task is launched (or any other helpful information).

Some unique string should be used as well so it's easy to search for it in Forest codebase. Ie:

`2478000-chkblkmsgs` for this [task](https://github.com/ChainSafe/forest/blob/main/blockchain/chain_sync/src/tipset_syncer.rs#L1289).

**Task summary**

- [ ] Identify all non-blocking and blocking tasks we have
- [ ] Use the task builder API to build a task with a name

**Acceptance Criteria**

- [ ] Make sure all tasks have a meaningful name using `tokio-console`

**Other information and links**

https://docs.rs/tokio/1.23.0/tokio/task/struct.Builder.html

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.