KAFKA-10199: Add task updater metrics, part 1#13228
Conversation
d33b743 to
20e5a4d
Compare
There was a problem hiding this comment.
This is to avoid checkstyle rules on func complexity, without much logical change (except letting restoreChangelog to return restored records count).
There was a problem hiding this comment.
This is related to 0) in PR description.
There was a problem hiding this comment.
Some minor logging fixes piggy-backed here.
lucasbru
left a comment
There was a problem hiding this comment.
lgtm, approving. Added minor comments, update as you prefer
There was a problem hiding this comment.
Not sure, but is there any performance concern around running this loop in every single iteration of runOnce ?
There was a problem hiding this comment.
I think the perf impact should be small since pause/resume are not commonly used, and if the named topology are not paused, then checking the status is just a few cpu cycles.
Another motivation is that if we remove named topologies, than pausing / resuming would always be impact on all tasks, in which case we could have a simpler check (e.g. just check a single flag) which would be even cheaper. So it's probably better to maintain the code layout in this way.
There was a problem hiding this comment.
Update the log message as well. This function isn't really checking task states anymore
There was a problem hiding this comment.
As I understand it, this function will be called quite frequently to export metrics. We only need the size of the collection. It could make sense to avoid the allocations here and just implement a getNumberOfUpdaingActiveTasks as a non-essential but free optimization. Similar for getPausedStandbyTasks etc. pp.
There was a problem hiding this comment.
That's a good point, will update.
8515538 to
57c7ef8
Compare
Should only be reviewed after #13025
Committer Checklist (excluded from commit message)