emit warning if bl merge slower than 50 seconds#4345
emit warning if bl merge slower than 50 seconds#4345ThomasBrady wants to merge 1 commit intostellar:masterfrom
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.
Can we use LogSlowExecution with threshold of 50 seconds for this?
There was a problem hiding this comment.
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.
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.
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.
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.
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-formatv8.0.0 (viamake formator the Visual Studio extension)