-
Notifications
You must be signed in to change notification settings - Fork 970
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
emit warning if bl merge slower than 50 seconds #4345
base: master
Are you sure you want to change the base?
emit warning if bl merge slower than 50 seconds #4345
Conversation
a484e88
to
74b26a6
Compare
src/bucket/FutureBucket.cpp
Outdated
doubleTime.count() / availableTime.count() * 100; | ||
auto timeSec = | ||
std::chrono::duration_cast<std::chrono::seconds>(time); | ||
if (time > std::chrono::seconds(50)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use LogSlowExecution
with threshold of 50 seconds for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered that, but we currently have (and I assume want to keep?) a debug log for every merge. If I change to use LogSlowExecution with a threshold of 50, then we will get a debug log for merges at the threshold and a warn (10x threshold) log for merges at 500 seconds. I could set a threshold of 5 seconds for a debug at 5 and a warn at 50. The debug would be duplicated in that case but I guess its not a big deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I think LogSlowExecution
with a threshold of 25 is a good middle ground, which gives us debug at 25 and warning at 250 right? BucketListDB is pretty mature so idk if we need super granular debug logs these days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry what i meant is that we should only warn if bucket merge crosses 1 min mark (so adjust the threshold accordingly). we should still debug log for all merges though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I might actually up that though to 2 minutes. 1 minute is pretty standard for big buckets and doesn't indicate that anything is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that seems fine
…gSlowExecution for bucket merges longer than 2 minutes
74b26a6
to
0829a25
Compare
Description
Resolves https://github.com/stellar/stellar-core-internal/issues/275
Checklist
clang-format
v8.0.0 (viamake format
or the Visual Studio extension)