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

Adaptive cleanup of mutex table #4414

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

sadhansood
Copy link
Contributor

@sadhansood sadhansood commented Aug 31, 2022

The current mutex table cleanup is not very good with handling load spikes since it runs at a fixed time period. We would want to also do cleanup if size of the table goes over a threshold. This diff adds a size() function (which will also be useful to track #entries in the table) as well as cleanup based on size threshold

@sadhansood sadhansood requested review from mystenmark, gdanezis, andll and velvia and removed request for mystenmark August 31, 2022 19:02
@sadhansood sadhansood marked this pull request as ready for review August 31, 2022 19:03
@@ -296,3 +333,47 @@ async fn test_mutex_table_bg_cleanup() {
assert!(locked.is_empty());
}
}

#[tokio::test]
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably want #[tokio::test(flavor = "current_thread", start_paused = true)]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, good point and done

@sadhansood sadhansood force-pushed the sadhan/mutex_table_cleanup_threshold branch from 4544872 to 409b299 Compare September 8, 2022 20:38
@sadhansood sadhansood merged commit 62182c8 into main Sep 9, 2022
@sadhansood sadhansood deleted the sadhan/mutex_table_cleanup_threshold branch September 9, 2022 16:51
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.

None yet

2 participants