You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "davidzollo (via GitHub)" <gi...@apache.org> on 2026/04/15 03:43:57 UTC

[I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

davidzollo opened a new issue, #10766:
URL: https://github.com/apache/seatunnel/issues/10766

   ### Search before asking
   
   - [x] I searched existing issues and found related discussions about replacing Hazelcast IMap / introducing StateStore, but did not find a dedicated issue for observability of engine state stores.
   
   ### Description
   
   ## Background
   
   SeaTunnel Zeta currently stores important engine state in Hazelcast-backed maps, and there is ongoing discussion about introducing a `StateStore` abstraction for future backend replacement.
   
   Today, however, the engine still lacks dedicated observability for those state stores.
   
   Current telemetry mainly exposes node / executor / partition / thread pool metrics, but it does not show the size, growth, or pressure of engine state stores such as:
   
   - `engine_runningJobInfo`
   - `engine_runningJobState`
   - `engine_stateTimestamps`
   - `engine_ownedSlotProfilesIMap`
   - `engine_runningJobMetrics`
   - `engine_finishedJobState`
   - `engine_finishedJobMetrics`
   - `engine_finishedJobVertexInfo`
   - `engine_checkpoint_monitor`
   - `engine_connectorJarRefCounters`
   
   This is already an operational blind spot today, regardless of whether we keep Hazelcast IMap or move to another backend later.
   
   ## Why this matters
   
   - Historical job state can accumulate and increase memory pressure.
   - Large state in distributed maps can increase GC pressure and may affect cluster communication.
   - When issues happen, we currently have no direct store-level metrics to confirm whether the bottleneck is state growth, cleanup lag, skew, or an abnormal store.
   - There is already at least one issue that reflects a store-size-related symptom in practice: #8558.
   - If we want to evaluate any future backend migration (for example RocksDB), we first need baseline observability on the current state layer.
   
   ## Proposal
   
   Add observability for engine state stores, starting with the current Hazelcast-backed implementation and keeping the design compatible with future `StateStore` abstractions.
   
   ### Phase 1: basic store-level metrics
   
   Expose metrics per store name, for example:
   
   - entry count
   - local owned entry count (when supported by backend / Hazelcast local stats)
   - backup entry count (when supported)
   - last-access / last-update related stats if available
   - approximate memory / heap cost if available
   
   ### Phase 2: logical metrics for special stores
   
   Some stores need business-aware metrics instead of only `size()`:
   
   - `engine_runningJobMetrics`
     - logical task metrics count
     - active partition key count
   - `engine_checkpoint_monitor`
     - job count in overview store
     - in-progress checkpoint count
     - retained history count
   - `engine_finishedJob*`
     - finished job record count
     - expiration / cleanup count if available
   - `engine_connectorJarRefCounters`
     - tracked jar count
     - total reference count
   
   ### Phase 3: alerting/documentation readiness
   
   - document the new metrics in telemetry docs
   - provide Prometheus / Grafana examples
   - clarify which metrics are backend-specific and which are generic `StateStore` metrics
   
   ## Scope / non-goals
   
   - This issue is **not** asking to replace Hazelcast IMap with RocksDB in the same step.
   - This issue is **not** asking to redesign the entire state layer first.
   - The goal is to make the current state layer observable, and to keep that observability usable if `StateStore` becomes the public internal abstraction later.
   
   ## Acceptance criteria
   
   - There is a documented metric set for engine state stores.
   - Operators can identify which store is growing abnormally.
   - At least the major engine stores listed above are covered.
   - Metrics are available through the existing telemetry / Prometheus endpoint.
   - Special stores such as `engine_runningJobMetrics` are not represented only by outer map size when that would be misleading.
   
   ### Related issues
   
   - #8558
   - #9851
   - #10181
   - #10209
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's Code of Conduct
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "JeremyXin (via GitHub)" <gi...@apache.org>.
JeremyXin commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4248974944

   @davidzollo I want to claim it and give it a try. Can you assign it to me?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4272483634

   > +1, agree with the phased approach.
   > 
   > Phase 1 with backend-neutral metric names makes sense - I'll start with that as soon as posibile.
   
   It's an important feature and looking forward your PR ^_^ 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "JeremyXin (via GitHub)" <gi...@apache.org>.
JeremyXin commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4565833739

   @dybyte Yes, I will deal with the rest part and submit the PR as soon as possible.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4253244037

   > Thanks, the concern about the upcoming `StateStore` work is valid.
   > 
   > I rechecked the current `dev` path: the engine already maintains multiple state stores (`runningJobInfo`, `runningJobState`, `finishedJobState`, `finishedJobMetrics`, `finishedJobVertexInfo`, `runningJobMetrics`, `checkpoint_monitor`, `connectorJarRefCounters`, etc.), but the dynamic metrics path registered today is still task-centric through `TaskExecutionService`. It does not expose per-store size / ownership / pressure metrics yet. So this observability gap exists now regardless of whether the backend stays on Hazelcast IMap or later moves behind `StateStore`.
   > 
   > My suggestion would be:
   > 
   > 1. keep phase 1 small and backend-aware: expose basic store-level metrics for the current major stores first
   > 2. use backend-neutral metric names where possible, so the same metric surface can later be implemented by `StateStore`
   > 3. leave business-aware logical metrics (especially `engine_runningJobMetrics` and checkpoint-related detail) as phase 2 once the `StateStore` shape is clearer
   > 
   > That way we do not block useful observability on the larger storage redesign, but we also avoid baking too much backend-specific logic into the final metric model.
   > 
   > If someone wants to pick this up, a very good first PR would be: major store coverage + basic metrics + docs, without trying to solve all logical metrics in one step.
   
   Good suggestion. I think 1 and 2 will be fine for us, how do you think ? @dybyte @JeremyXin 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4257429941

   Thanks @JeremyXin. That sounds like the right first slice.
   
   For Phase 1, please keep the PR focused on basic store-level metrics and avoid trying to implement all logical / business-aware metrics in the same change.
   
   A good first PR scope would be:
   
   1. cover the major current engine stores
   2. expose basic metrics such as store size / local owned entries where the backend supports them
   3. use backend-neutral metric names as much as possible, so the same metric surface can later be implemented by the `StateStore` layer
   4. document the new metrics in the telemetry / Prometheus docs
   
   For metrics that are Hazelcast-specific, please make that explicit in the implementation or docs. The logical metrics for stores like `engine_runningJobMetrics` and checkpoint history can be handled in a later phase once the `StateStore` abstraction is clearer.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "JeremyXin (via GitHub)" <gi...@apache.org>.
JeremyXin commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4257340314

   +1, agree with the phased approach.
   
   Phase 1 with backend-neutral metric names makes sense - I'll start with that as soon as posibile.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4597817188

   Small correction on the assignment part above: I attempted to assign this to @JeremyXin, but GitHub does not currently allow that assignee operation on the repository side for this account.
   
   So the practical status is: @JeremyXin has claimed the work in the thread and confirmed they still plan to continue it, but the issue is still being tracked without a formal GitHub assignee at the moment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang closed issue #10766: [Improve][Zeta] Add observability for engine state stores (IMap / StateStore)
URL: https://github.com/apache/seatunnel/issues/10766


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4253406624

   > > Thanks, the concern about the upcoming `StateStore` work is valid.
   > > I rechecked the current `dev` path: the engine already maintains multiple state stores (`runningJobInfo`, `runningJobState`, `finishedJobState`, `finishedJobMetrics`, `finishedJobVertexInfo`, `runningJobMetrics`, `checkpoint_monitor`, `connectorJarRefCounters`, etc.), but the dynamic metrics path registered today is still task-centric through `TaskExecutionService`. It does not expose per-store size / ownership / pressure metrics yet. So this observability gap exists now regardless of whether the backend stays on Hazelcast IMap or later moves behind `StateStore`.
   > > My suggestion would be:
   > > 
   > > 1. keep phase 1 small and backend-aware: expose basic store-level metrics for the current major stores first
   > > 2. use backend-neutral metric names where possible, so the same metric surface can later be implemented by `StateStore`
   > > 3. leave business-aware logical metrics (especially `engine_runningJobMetrics` and checkpoint-related detail) as phase 2 once the `StateStore` shape is clearer
   > > 
   > > That way we do not block useful observability on the larger storage redesign, but we also avoid baking too much backend-specific logic into the final metric model.
   > > If someone wants to pick this up, a very good first PR would be: major store coverage + basic metrics + docs, without trying to solve all logical metrics in one step.
   > 
   > Good suggestion. I think 1 and 2 will be fine for us, how do you think ? [@dybyte](https://github.com/dybyte) [@JeremyXin](https://github.com/JeremyXin)
   
   +1 šŸ‘ 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4597820110

   Final status update here: the issue now does show @JeremyXin as the assignee on the GitHub side, so please treat the assigned state as the current source of truth.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4252929210

   Thanks, the concern about the upcoming `StateStore` work is valid.
   
   I rechecked the current `dev` path: the engine already maintains multiple state stores (`runningJobInfo`, `runningJobState`, `finishedJobState`, `finishedJobMetrics`, `finishedJobVertexInfo`, `runningJobMetrics`, `checkpoint_monitor`, `connectorJarRefCounters`, etc.), but the dynamic metrics path registered today is still task-centric through `TaskExecutionService`. It does not expose per-store size / ownership / pressure metrics yet. So this observability gap exists now regardless of whether the backend stays on Hazelcast IMap or later moves behind `StateStore`.
   
   My suggestion would be:
   1. keep phase 1 small and backend-aware: expose basic store-level metrics for the current major stores first
   2. use backend-neutral metric names where possible, so the same metric surface can later be implemented by `StateStore`
   3. leave business-aware logical metrics (especially `engine_runningJobMetrics` and checkpoint-related detail) as phase 2 once the `StateStore` shape is clearer
   
   That way we do not block useful observability on the larger storage redesign, but we also avoid baking too much backend-specific logic into the final metric model.
   
   If someone wants to pick this up, a very good first PR would be: major store coverage + basic metrics + docs, without trying to solve all logical metrics in one step.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4597811218

   Assigned to @JeremyXin based on the earlier claim in this thread.
   
   I think that is the right next step here. Please keep the first PR focused on the Phase 1 scope we discussed earlier: major engine stores, basic store-level metrics, and the accompanying docs. If the remaining logical/business-aware metrics need a separate follow-up, splitting that later is completely fine.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "corgy-w (via GitHub)" <gi...@apache.org>.
corgy-w closed issue #10766: [Improve][Zeta] Add observability for engine state stores (IMap / StateStore)
URL: https://github.com/apache/seatunnel/issues/10766


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4250465076

   I’m planning to start the StateStore layer work soon, and I already have a rough design in mind.
   So I wonder whether it might be better to align the monitoring work with that layer, to reduce duplicated metric logic and avoid rework later.
   Maybe basic store-level metrics can still move first, but it seems worth considering the StateStore direction before going too far into the implementation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-4564379768

   It seems that Phase 2 and Phase 3 are still pending.
   @JeremyXin Do you plan to continue working on the remaining parts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][Zeta] Add observability for engine state stores (IMap / StateStore) [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on issue #10766:
URL: https://github.com/apache/seatunnel/issues/10766#issuecomment-5268031727

   This issue has been resolved by the merged PRs:
    - #10860 [Improve] [Zeta] Add observability metrics for engine state stores
    - #11024 [Improve][Zeta] Add logical state store observability metrics
   
   Closing as completed. If the problem persists, please reopen with details.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org