leaves12138 opened a new pull request, #10063:
URL: https://github.com/apache/paimon/pull/10063

   ### Purpose
   
   Close the input stream if native full-text reader construction is 
interrupted.
   
   `NativeFullTextGlobalIndexReader._ensure_loaded()` opens the stream before 
constructing `FullTextIndexReader`, but transfers it to `self._stream` only 
after construction succeeds. Its existing `except Exception` does not handle 
`KeyboardInterrupt` or `SystemExit`, so these failures leave the opened stream 
unclosed. The outer cleanup introduced in #9997 cannot close that local stream 
because it has not been assigned to the reader yet.
   
   Catch `BaseException` solely around initialization cleanup, close the 
stream, and re-raise the original failure. Add a parametrized regression 
through `DataEvolutionFullTextRead._eval()` covering `ValueError`, 
`KeyboardInterrupt`, and `SystemExit`.
   
   ### Tests
   
   - Before the fix, the new `KeyboardInterrupt` and `SystemExit` cases fail 
because the stream remains open; the existing five lifetime cases and the new 
`ValueError` case pass.
   - After the fix, `python -m pytest -q 
pypaimon/tests/full_text_reader_cleanup_test.py 
pypaimon/tests/vector_search_filter_test.py`: **84 passed** on Python 3.10.
   - `git diff --check` passes.
   
   The regression injects failures at the native constructor boundary and does 
not require `paimon_ftindex`; a real native-extension interrupt integration 
test was not run. This is deterministic resource-cleanup coverage, not evidence 
of a production incident.
   


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