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

Cleanup CompactionProcessor metrics upon subscription close #97

Open
ocadaruma opened this issue Mar 12, 2021 · 0 comments
Open

Cleanup CompactionProcessor metrics upon subscription close #97

ocadaruma opened this issue Mar 12, 2021 · 0 comments

Comments

@ocadaruma
Copy link
Member

ocadaruma commented Mar 12, 2021

refs: #95 (comment)

  • In principle, we close every Decaton's internal metrics by implementing https://github.com/line/decaton/blob/master/processor/src/main/java/com/linecorp/decaton/processor/metrics/Metrics.java#L64
  • But CompactionProcessor is an exception
    • Since there's no way to pass subscriptionId upon CompactionProcessor instantiation, CompactionProcessor's metrics are registered every time per task, so AbstractMetrics isn't useable
      • Though we confirmed it doesn't cause much overhead
  • Possible fix for this will be like below:
    • Make CompactionProcessor constructor to receive subscriptionId
      • Or It'd better to pass information which is available on the processor scope (partition, threadId) in addition to subscriptionId
    • Add ProcessorsBuilder#thenProcess overload that receives supplier of type Function<ScopeInfo, DecatonProcessor>
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

No branches or pull requests

1 participant