You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org> on 2026/08/01 08:18:10 UTC
[PR] [python] Enforce global limit for Torch streaming reads [paimon]
XiaoHongbo-Hope opened a new pull request, #8977:
URL: https://github.com/apache/paimon/pull/8977
### Purpose
`TableRead.to_iterator` applies its limit within one iterator. A streaming Torch dataset creates multiple iterators across DataLoader workers, split-prefetch threads, and shuffled split readers, so each iterator could consume the full limit independently. For example, two four-row splits with `LIMIT 5` returned eight rows with two DataLoader workers.
This change adds a row quota shared by all worker processes and prefetch threads. A reader reserves quota before materializing its next row and returns unused reservations when an iterator is exhausted. The quota resets after all workers finish an iteration, including with persistent workers. Split assignment, worker concurrency, and prefetch concurrency remain enabled.
This bug predates and is independent of #8808, so the fix is submitted separately.
### Tests
- `python3.11 -m pytest -q pypaimon/tests/torch_read_test.py` (19 passed, 2 subtests passed)
- `python3.11 -m flake8 --config=dev/cfg.ini pypaimon/read/datasource/torch_dataset.py pypaimon/tests/torch_read_test.py`
- Python 3.6 `py_compile` for the changed Python files
- `git diff --check`
The regression coverage includes fork and spawn DataLoader workers, concurrent split prefetch, persistent-worker iteration reset, and shuffled streaming reads.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] Enforce global limit for Torch streaming reads [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope commented on PR #8977:
URL: https://github.com/apache/paimon/pull/8977#issuecomment-5150665137
Closing this draft because the Torch streaming global-limit issue predates and is independent of #8808. The cross-process quota implementation adds substantial complexity for a narrowly scoped behavior; we can revisit it separately if global LIMIT semantics are required for multi-worker Torch streaming reads.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] Enforce global limit for Torch streaming reads [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope closed pull request #8977: [python] Enforce global limit for Torch streaming reads
URL: https://github.com/apache/paimon/pull/8977
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org