ISSUE #931,#907: Add option to track task execution time#932
ISSUE #931,#907: Add option to track task execution time#932athanatos wants to merge 1 commit intoapache:masterfrom
Conversation
eolivelli
left a comment
There was a problem hiding this comment.
Nice change. I left some minor comments
| } | ||
| } | ||
|
|
||
| @Test(timeout = 6000) |
There was a problem hiding this comment.
Nit: Drop timeouts we have now in surefire config
| "BookieLongPollThread-" + serverCfg.getBookiePort(), OrderedScheduler.NO_TASK_LIMIT); | ||
| "BookieLongPollThread", | ||
| OrderedScheduler.NO_TASK_LIMIT, | ||
| NullStatsLogger.INSTANCE); |
There was a problem hiding this comment.
Can't we pass the statslogger here as well?
There was a problem hiding this comment.
Yeah, no reason not to. Will fix.
| ++toRemoveIndex; | ||
| } | ||
| if (toRemove != null) { | ||
| stopAutoRecoveryService(toRemove); |
There was a problem hiding this comment.
This line seems to related to the issue
There was a problem hiding this comment.
Sorry for typo, it does not seem to be related to the issue
There was a problem hiding this comment.
stopAutoRecoveryService gets called as part of of killBookie. I refactored it a little to make the bs/bsLoggers state maintenance slightly less error prone.
Fixes a bug in OrderedScheduler introduced in e33ec10 which failed to track execution time with some callsand adds an option to enable it in the bookie. Also fix bug with task_queued duration. Add a simple mock for remembering stats long enough to verify that counters are actually used and sensible in unit tests and bake it into BookKeeperClusterTestCase so that we can write tests to ensure that the stats are actually counted and make sense. Use said mock to add simple tests for top level read and write stats validating this fix. (@bug W-4276826@) (@bug W-4268290@) Signed-off-by: Samuel Just <sjust@salesforce.com>
b00a3de to
dd15a5d
Compare
|
@eolivelli I think I've addressed your other comments. |
Fixes a bug in OrderedScheduler introduced in e33ec10 which failed to track execution time with some calls and adds an option to enable it in the bookie. Also fixes a bug with task_queued duration. Add a simple mock for remembering stats long enough to verify that counters are actually used and sensible in unit tests and bake it into BookKeeperClusterTestCase so that we can write tests to ensure that the stats are actually counted and make sense. Use said mock to add simple tests for top level read and write stats validating this fix. (bug W-4276826) (bug W-4268290) Signed-off-by: Samuel Just <sjustsalesforce.com> Author: Samuel Just <sjust@salesforce.com> Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <sijie@apache.org> This closes #932 from athanatos/forupstream/issue-931, closes #931, closes #907
Fixes a bug in OrderedScheduler introduced in
e33ec10 which failed to track execution
time with some calls and adds an option to enable it in the bookie. Also
fixes a bug with task_queued duration.
Add a simple mock for remembering stats long enough to verify that
counters are actually used and sensible in unit tests and bake it into
BookKeeperClusterTestCase so that we can write tests to ensure that the
stats are actually counted and make sense. Use said mock to add simple
tests for top level read and write stats validating this fix.
(@bug W-4276826@)
(@bug W-4268290@)
Signed-off-by: Samuel Just sjust@salesforce.com