davidzollo commented on PR #11727:
URL: https://github.com/apache/seatunnel/pull/11727#issuecomment-5413195809

   > @DanielLeens @SEZ9 The part that actually prevents that is the remove(key, 
value) identity check against the context pinned at deploy time, which needs 
the tracker to hold the context it owns. That looks like the same ownership 
model as ownedContext in #11757, so rather than write it twice or risk 
conflicting logic with @waterWang's work, I'd rather confirm the intended split 
with you. Would you prefer the ownership fix here in #11727, with #11757 
rebasing on top? Or should #11727 land with the narrower change and leave the 
identity check to #11757? Happy to go either way, I just didn't want to guess. 
I'll hold the eviction change and the cross-generation test until you've had a 
chance to weigh in.
   
   Thanks for calling this out. I agree with your analysis: moving remove() 
before recycleClassLoader() is not sufficient by itself, because a stale 
generation can still remove the newer generation's context if that context has 
already been installed under the reused TaskGroupLocation.
   
   My preference is to fix the ownership model in this PR (#11727): let the 
tracker hold the TaskGroupContext it owns, use 
executionContexts.remove(taskGroupLocation, ownedContext), and only 
recycle/archive the context when that identity-checked remove succeeds. Then 
#11757 can rebase on top of this PR and focus on any remaining broader 
cleanup/follow-up.
   
   I would not merge #11727 with the narrower change and leave the identity 
check entirely to #11757, because this PR itself makes taskDone() reliably 
reachable from the failure path, so the cleanup path needs to be 
generation-safe before merge.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to