VGalaxies commented on code in PR #710:
URL:
https://github.com/apache/hugegraph-toolchain/pull/710#discussion_r3469421954
##########
hugegraph-loader/src/main/java/org/apache/hugegraph/loader/reader/file/FileLineFetcher.java:
##########
@@ -158,6 +157,10 @@ public void closeReader() throws IOException {
@Override
public Line fetch() throws IOException {
while (true) {
+ // Fix NPE: check if reader is null before reading
Review Comment:
**Medium: Missing regression coverage for local parser-concurrency NPE**
`hugegraph-loader/src/main/java/org/apache/hugegraph/loader/reader/file/FileLineFetcher.java:160`
**Evidence**
- The fix adds a null-reader guard in `fetch()`, and this PR only adds
`--parser-threads 4` to two HDFS tests at `HDFSLoadTest.java:69` and
`HDFSLoadTest.java:99`. The existing local functional tests still document the
same NPE risk and force `--parser-threads 1` at `FileLoadTest.java:1201`,
`FileLoadTest.java:1338`, and `FileLoadTest.java:1636`.
**Impact**
- CI can pass without proving the known local multi-file reader/parser
concurrency path is fixed, so the NPE can regress while the old FIXME-protected
cases remain disabled.
**Requested fix**
- Re-enable at least one existing NPE-marked local functional test with
`--parser-threads > 1`, or add a focused regression test that exercises the
fixed reader-null close/fetch path.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]