jonhoo / jonhoo/tracing-timing
Avoid taking write lock on span creation
Open
- Dominant language
- Rust
- Stars
- 136
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Here's a rough sketch of the idea:
- Use an atomic `Slab` (@hawkw has something brewing) for `span id => group`.
- Use an atomic skiplist of `(group, group state)` for `group => group state`. On a new span, if the group does not exist in the list, try to insert it. If the insert CAS fails, search `idle-recorders` again for the group. If it does not exist, try to add it again. Repeat until successful.
With this, I _believe_ the entire outer lock can go away, as all access should be through `&self`. We may still want to keep it for `force_synchronize` though.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.