You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "ricky2129 (via GitHub)" <gi...@apache.org> on 2026/06/07 14:52:56 UTC

[I] serialVersionUID checker (#9118) misses job-graph config classes; and a question on cross-version state compatibility [seatunnel]

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

   raising a gap we hit on upgrade, plus a broader question.
   
     1. Concrete gap (specific):
     SerialVersionUIDCheckerTest (#9118) only scans classes implementing SeaTunnelSource/SeaTunnelSink. But the serialized job graph also includes config factories (e.g.
     MySqlSourceConfigFactory) and config objects (e.g. JdbcConnectionConfig) — these aren't covered.
   
     Example: MySqlSourceConfigFactory has no serialVersionUID. Adding one field changed its auto-generated UID, so jobs submitted on the old version failed to deserialize
     on the new one (InvalidClassException) on restart. The checker can't catch this because it doesn't scan the class.
   
     Would you accept a PR extending the checker to config factories / config / DAG classes?
   
     2. Broader question (general):
     Even with a UID, compatibility isn't guaranteed. JdbcConnectionConfig has a pinned UID (2L), but 2.3.13 added new fields — old state deserializes with no error, but
     the new fields come back 0/null instead of their defaults (initializers don't run on deserialization). So a UID alone hides a silent behavior change.
     
     So the real questions:
     - Is restoring a running job's serialized state across versions expected to work, or is stop-with-savepoint + resubmit the only supported upgrade path?
     - What's the recommended way to add a field to a serialized config/state class without breaking or silently changing old state (readObject / defaults / a versioning
     convention)?
     
     Happy to contribute the checker extension if it's wanted


-- 
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] serialVersionUID checker (#9118) misses job-graph config classes; and a question on cross-version state compatibility [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #11020: serialVersionUID checker (#9118) misses job-graph config classes; and a question on cross-version state compatibility
URL: https://github.com/apache/seatunnel/issues/11020


-- 
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] serialVersionUID checker (#9118) misses job-graph config classes; and a question on cross-version state compatibility [seatunnel]

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

   @davidzollo please help here, this is a critical path which can help improve the stability of the seatunnel clusters.


-- 
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] serialVersionUID checker (#9118) misses job-graph config classes; and a question on cross-version state compatibility [seatunnel]

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

   Thanks for raising both parts of this so clearly.
   
   I checked the current `SerialVersionUIDCheckerTest` path, and the concrete gap you pointed out is real: today the check is centered on classes that implement `SeaTunnelSource` or `SeaTunnelSink`, so it can miss other classes that still end up serialized inside the job graph, such as config factories or config objects. Extending the checker in that direction sounds reasonable.
   
   At the same time, I agree with your broader concern that `serialVersionUID` alone is not a complete compatibility guarantee. It can prevent one hard-failure class (`InvalidClassException`), but it does not by itself protect us from silent semantic changes when new fields are introduced and deserialized old state comes back with `0` / `null` values.
   
   So I would separate this into two layers:
   1. a practical improvement: broaden the checker so it covers the job-graph classes that are actually serialized during restore paths;
   2. a design/compatibility question: define more clearly what upgrade path SeaTunnel officially supports for serialized runtime state, and what compatibility expectations we want to guarantee across versions.
   
   My suggestion would be to keep the first step small and concrete. A PR that extends the checker coverage to the relevant config/config-factory/job-graph classes would be useful on its own, even before we fully settle the larger cross-version state policy.
   
   For the broader question, I do not think we should imply that “having a fixed UID” means cross-version restore is generally safe. If we want to support that path more explicitly, we likely need clearer project guidance on when stop-with-savepoint + resubmit is the expected upgrade path, and what coding rules serialized state/config classes should follow when fields evolve.
   
   So yes — the checker extension looks like a good contribution direction, and the larger compatibility question is also worth documenting more explicitly rather than leaving it implicit.


-- 
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