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

Enable rocksdb read option avoid_unnecessary_blocking_io to avoid unexpected long latency #1903

Merged
merged 4 commits into from
Nov 22, 2023

Conversation

wanghenshui
Copy link
Contributor

git-hulk
git-hulk previously approved these changes Nov 22, 2023
Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@git-hulk git-hulk changed the title avoid unnecessary blocking io on iterater destruction, reduce latency Enable rocksdb read option avoid_unnecessary_blocking_io to avoid unexpected long latency Nov 22, 2023
@mapleFU
Copy link
Member

mapleFU commented Nov 22, 2023

Seems this would making purge to background? Just take a quick glance seems this doesn't have some risk?

Also should we make this a flag? If this has bug, can we quickly turn it off?

mapleFU
mapleFU previously approved these changes Nov 22, 2023
@mapleFU
Copy link
Member

mapleFU commented Nov 22, 2023

Seems that speedb also having this. Let's checkin this if other doesn't have any negative views

@wanghenshui
Copy link
Contributor Author

Seems this would making purge to background? Just take a quick glance seems this doesn't have some risk?

yes

Also should we make this a flag? If this has bug, can we quickly turn it off?

avoid_unnecessary_blocking_io is global option, could not turn off online

add avoid_unnecessary_blocking_io is false as default

if user don't care iterating with io purge, just dont change it
if user iterates a lot, change config to turn it on

@mapleFU
Copy link
Member

mapleFU commented Nov 22, 2023

avoid_unnecessary_blocking_io is global option, could not turn off online

Just a non-dynamic flag? 🤔 I think it doesn't have any risks except the implement has bug, so set it hardcode true is also ok

@wanghenshui
Copy link
Contributor Author

avoid_unnecessary_blocking_io is global option, could not turn off online

Just a non-dynamic flag? 🤔 I think it doesn't have any risks except the implement has bug, so set it hardcode true is also ok

flag added. let user know this option and make choice

@git-hulk
Copy link
Member

I prefer enabling this option by default since it may reduce the iterator latency. And it'd be better to hide this configuration in kvrocks.conf, because I think users should not care about this configuration.

@mapleFU
Copy link
Member

mapleFU commented Nov 22, 2023

Agree, we can default enable it. But let user know we can disable it if it has bug?

@git-hulk
Copy link
Member

git-hulk commented Nov 22, 2023

Agree, we can default enable it. But let user know we can disable it if it has bug?

My thought is to hide this option in kvrocks.conf if we don't expect users to change this unless any users ask about this. What do you think?

@PragmaTwice
Copy link
Member

My thought is to hide this option in kvrocks.conf if we don't expect users to change this unless any users ask about this. What do you think?

Hiding a configuration option in kvrocks.conf can make maintenance more difficult. I believe we should have a document that lists all hidden options.

Simply hiding it without any explanation or documentation does not seem acceptable.

@git-hulk
Copy link
Member

My thought is to hide this option in kvrocks.conf if we don't expect users to change this unless any users ask about this. What do you think?

Hiding a configuration option in kvrocks.conf can make maintenance more difficult. I believe we should have a document that lists all hidden options.

Simply hiding it without any explanation or documentation does not seem acceptable.

My point is may overload the configuration file as time goes on. So I'm wondering if we should export every option to users, or only export to them what they should care about. It's good for me to leave as it is.

kvrocks.conf Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Nov 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mapleFU
Copy link
Member

mapleFU commented Nov 22, 2023

My thought is to hide this option in kvrocks.conf if we don't expect users to change this unless any users ask about this. What do you think?

LGTM

@git-hulk git-hulk merged commit 2b9faf7 into apache:unstable Nov 22, 2023
30 checks passed
@wanghenshui wanghenshui deleted the avoid_blocking_io branch November 22, 2023 16:45
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.

5 participants