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

[Perf] Speed up locking in DataMap::atomic_checkpoint #2506

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

ljedrz
Copy link
Collaborator

@ljedrz ljedrz commented Jun 26, 2024

This is a tiny change I found while pruning my local branches, and I wouldn't want us to miss it.

The guard on atomic_batch is utilized a lot, which - in the current setup - also causes the guard on checkpoints used in the atomic_checkpoint method to be in force significantly longer than necessary.

This tiny change with no impact on logic fixes this, as confirmed by guard lifetime measurements in a --dev run; the maximum guard (on checkpoints) duration is reduced by ~75%.

Copy link
Contributor

@raychu86 raychu86 left a comment

Choose a reason for hiding this comment

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

LGTM as long as CI passes.

@ljedrz
Copy link
Collaborator Author

ljedrz commented Jul 9, 2024

CI run link

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.

3 participants