DanielLeens opened a new pull request, #12984:
URL: https://github.com/apache/seatunnel/pull/12984

   ### Purpose of this pull request
   
   PR #5542 introduced a periodic connector jar cleanup `Timer` owned by 
`SharedConnectorJarStorageStrategy`. `CoordinatorService` creates a new 
connector package service whenever a node becomes active master, but 
coordinator teardown did not close the previous service. Every master demotion 
and later promotion could therefore retain the old timer thread, its cleanup 
task, the storage strategy, and the associated server and distributed-map 
object graph.
   
   The same ownership gap also affected failed initialization: if 
`Timer.schedule` rejected an invalid cleanup interval after the timer thread 
had started, repeated coordinator initialization retries could retain one 
thread per attempt.
   
   This patch:
   
   - adds a backward-compatible close contract to connector jar storage 
strategies;
   - cancels the SHARED cleanup timer during coordinator teardown;
   - clears the coordinator reference after the bounded executor termination 
wait, preserving existing `JobMaster` finalization access;
   - cancels a newly created timer if scheduling fails; and
   - strengthens the existing master failover test to verify that timer count 
remains bounded and returns to baseline after shutdown, plus covers the 
failed-constructor path.
   
   ### Does this PR introduce any user-facing change?
   
   No. Configuration keys, defaults, connector jar semantics, serialization, 
and the ISOLATED storage strategy remain unchanged.
   
   ### How was this patch tested?
   
   - `./mvnw spotless:apply -pl seatunnel-engine/seatunnel-engine-server -nsu 
-Dmaven.gitcommitid.skip=true`
   - `./mvnw spotless:check -pl seatunnel-engine/seatunnel-engine-server -nsu 
-Dmaven.gitcommitid.skip=true`
   - Added regression coverage in `ConnectorPackageServiceTest` for master 
failover, full shutdown, stale service detachment, and failed timer scheduling.
   
   Per the local SeaTunnel validation policy, compilation and tests were not 
run locally; the current PR head GitHub CI is the authoritative runtime 
verification gate.


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