You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "nielifeng (via GitHub)" <gi...@apache.org> on 2026/07/20 02:12:29 UTC
[PR] [Fix][Zeta] Prevent negative intermediate queue metrics [seatunnel]
nielifeng opened a new pull request, #11498:
URL: https://github.com/apache/seatunnel/pull/11498
### Purpose of this pull request
Closes #11497.
`IntermediateBlockingQueue` publishes a record before the producer can update `IntermediateQueueSize`. A concurrent consumer can therefore dequeue the record and decrement the shared total first, temporarily exposing a negative value through the REST metrics API.
This patch shares queue metric ordering state across all wrappers for the same blocking queue. If a dequeue metric notification arrives before its enqueue notification, the tracker pairs the two events without decrementing the total below zero. Queue occupancy is also updated immediately after polling, so records dropped by `prepareClose` or followed by a collector failure do not leave stale counts.
### Does this PR introduce _any_ user-facing change?
Yes. Zeta REST job metrics no longer report a negative `IntermediateQueueSize` during concurrent enqueue and dequeue. There are no configuration or API changes.
### How was this patch tested?
Added deterministic unit coverage that pauses a producer after `put()` publishes a record, drains it through a separate consumer wrapper, and verifies the shared total never becomes negative. Added coverage for dequeued records dropped during `prepareClose`.
```shell
./mvnw -pl seatunnel-engine/seatunnel-engine-server -Dtest=IntermediateBlockingQueueSignalTest test
```
Result: 7 tests passed.
The repository-level `./mvnw -q -DskipTests verify` completed the Zeta modules and later failed in the unrelated `connector-jdbc` module on existing source compilation errors.
### Check list
* [x] No new Jar binary package is added.
* [x] No documentation update is required for this metrics correctness fix.
* [x] No incompatible change is introduced.
* [x] This PR does not change connector code.
--
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: [PR] [Fix][Zeta] Prevent negative intermediate queue metrics [seatunnel]
Posted by "nielifeng (via GitHub)" <gi...@apache.org>.
nielifeng commented on PR #11498:
URL: https://github.com/apache/seatunnel/pull/11498#issuecomment-5029963813
Rebuilt the change on current upstream `dev` at head `9e7d310b5` as requested. `IntermediateBlockingQueueSignalTest`: 10 tests passed; server module `-DskipTests verify` passed.
--
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: [PR] [Fix][Zeta] Prevent negative intermediate queue metrics [seatunnel]
Posted by "nielifeng (via GitHub)" <gi...@apache.org>.
nielifeng commented on PR #11498:
URL: https://github.com/apache/seatunnel/pull/11498#issuecomment-5041898356
CI follow-up: the source-reviewed head remains unchanged at 9e7d310b5. The failed Build was concentrated in unrelated connector integration lanes (all-connectors-it-7, Kafka, and RocketMQ), with paired matrix jobs cancelled after failures. I re-ran failed jobs only; workflow 29799689096 is now queued as attempt 2. No business-code change was made.
--
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: [PR] [Fix][Zeta] Prevent negative intermediate queue metrics [seatunnel]
Posted by "nielifeng (via GitHub)" <gi...@apache.org>.
nielifeng commented on PR #11498:
URL: https://github.com/apache/seatunnel/pull/11498#issuecomment-5030543582
## Stability validation result\n\nA targeted 24-hour Zeta stability run for this fix completed successfully.\n\n**Version relationship**\n\n- Tested commit: \n- Current rebased PR head: \n- Both changes have the same stable patch ID: \n- Result: **PASS**\n- Completed: \n\nThe 24-hour binary was built from ; the patch content is identical to the current rebased head.\n\n**24-hour soak**\n\n- Source records: \n- Sink writes: \n- Source/write sampling gap: \n- Final intermediate queue size: \n- Checkpoints: \n- QPS p50: \n- QPS p95: \n- Negative intermediate queue samples: **0**\n- Test runner exit: \n\n**Additional gates**\n\n- 150k regression gate: PASS; QPS p50 , p95 ; checkpoints ; negative samples \n- 1.2m saturation gate: PASS; QPS p50 , p95 ; checkpoints ; negative samples \n\nNo checkpoint failures, worker loss, pending-job buildup, slot leak, swap, full GC, or live application ERROR/FATAL records were observed during the run. Internal raw artifacts have been retained for fol
low-up if needed.
--
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: [PR] [Fix][Zeta] Prevent negative intermediate queue metrics [seatunnel]
Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on PR #11498:
URL: https://github.com/apache/seatunnel/pull/11498#issuecomment-5024573128
Please rebase the upstream/dev branch, the CI issue has been fixed. Thanks🚀
--
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: [PR] [Fix][Zeta] Prevent negative intermediate queue metrics [seatunnel]
Posted by "nielifeng (via GitHub)" <gi...@apache.org>.
nielifeng commented on PR #11498:
URL: https://github.com/apache/seatunnel/pull/11498#issuecomment-5043632525
CI follow-up: failed-only rerun attempt 2 completed successfully for unchanged head `9e7d310b5`. The final Kafka JDK 11 lane passed, and workflow `29799689096` now has an overall `success` conclusion. No source change was needed.
--
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: [PR] [Fix][Zeta] Prevent negative intermediate queue metrics [seatunnel]
Posted by "nielifeng (via GitHub)" <gi...@apache.org>.
nielifeng merged PR #11498:
URL: https://github.com/apache/seatunnel/pull/11498
--
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