Skip to content

feat: Use dashmap for health monitor#247

Open
dylankyc wants to merge 1 commit intoHelicone:mainfrom
dylankyc:main
Open

feat: Use dashmap for health monitor#247
dylankyc wants to merge 1 commit intoHelicone:mainfrom
dylankyc:main

Conversation

@dylankyc
Copy link
Copy Markdown

No description provided.

}
result
} else {
Ok(())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Health Checks Fail Due to DashMap Race Condition

A race condition in the health monitoring loop, introduced by the DashMap migration, can cause health checks to be silently skipped or misapplied. The loop iterates over DashMap entries to collect router IDs, then attempts to retrieve and check the corresponding monitor via get_mut() within an async future. If an entry is removed or replaced between iteration and get_mut(), the health check is silently skipped (returning Ok(())) or the wrong monitor is checked. This bypasses the concurrency control of the previous RwLock implementation, potentially leading to unmonitored failed providers.

Fix in Cursor Fix in Web

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.

1 participant