Azure / Azure/azure-sdk-for-rust
Cosmos: consolidate periodic account-metadata refresh loop into runtime-owned task
- Dominant language
- Rust
- Stars
- 884
- Forks
- 365
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 102
Description
Follow-up tracking issue for the work in #4458 (closed without merging).
## Goal
Move the periodic database-account metadata refresh loop from per-`CosmosDriver` (one tokio task per driver) to per-`CosmosDriverRuntime` (single task iterating a registry of registered account endpoints). A runtime hosting N drivers should issue one fetch per registered account per interval, not N concurrent tasks. Originally introduced as the per-driver loop in #4407.
## References
- Original per-driver loop: #4407
- Closed PR with the consolidation work: #4458
Contributor guide
Research direction
Start by reviewing the closed consolidation work in #4458 and the original per-driver loop in #4407. Trace how the periodic refresh is owned by each CosmosDriver and how CosmosDriverRuntime registers account endpoints; done means one runtime-owned task fetches each registered account once per interval without one task per driver.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, rust
- Domain
- database
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100