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

   ### Purpose of this pull request
   
   Fixes #10997.
   
   `ReportMetricsOperation` performs the distributed metrics IMap update
   synchronously. Running it on Hazelcast generic-operation threads lets metrics
   work contend with checkpoint and task lifecycle control operations under 
heavy
   reporting load.
   
   This patch makes `ReportMetricsOperation.call()` return Hazelcast's explicit
   `Offload` status and schedules the metrics update on the built-in
   `OFFLOADABLE_EXECUTOR`. The operation response is sent only after the metrics
   update finishes, so callers retain the existing invocation completion
   semantics. The metrics payload, serializer ID, storage, and
   `SeaTunnelServer.updateMetrics()` behavior are unchanged.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Internal metrics reports no longer execute on Hazelcast 
generic-operation
   threads, reducing the risk that metrics reporting delays checkpoint and batch
   job completion control operations. There is no public API or configuration
   change.
   
   ### How was this patch tested?
   
   - Added `ReportMetricsOperationTest` with a real local Hazelcast member to
     verify the operation leaves generic-operation threads, runs through the
     offloadable executor, keeps the invocation future incomplete until the
     metrics update finishes, and propagates update failures.
   - Verified the existing metrics IMap integration path still stores metrics
     across the configured partitions.
   
   ```shell
   ./mvnw -o -pl seatunnel-engine/seatunnel-engine-server \
     -Dtest=ReportMetricsOperationTest test
   
   ./mvnw -o -pl seatunnel-engine/seatunnel-engine-server \
     -Dtest=CoordinatorServiceTest#testMetricsImapSizeWithPartitionConfig test
   ```
   
   Both focused tests pass on the latest `dev` branch.
   
   ### Check list
   
   * [x] No new Jar binary package is added.
   * [x] Documentation is not required because there is no new feature or user 
configuration.
   * [x] No incompatible change is introduced.
   * [x] Connector-specific checklist items are not applicable.
   


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