VladRodionov commented on PR #8851: URL: https://github.com/apache/hbase/pull/8851#issuecomment-6970577911
GPT 6.1 Sol High review. Reviewed PR #8851 at `5038b2709e24cf3cc47d47ba7354b65665f7264c`. **Recommendation: -1 pending one P2 fix.** **Blocker** - **[P2] Close streams delivered after an interrupted open** — [[FSUtils.java:235–238](https://github.com/apache/hbase/blob/5038b2709e24cf3cc47d47ba7354b65665f7264c/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java#L235-L238)](https://github.com/apache/hbase/blob/5038b2709e24cf3cc47d47ba7354b65665f7264c/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java#L235-L238). When interruption stops `get()`, the asynchronous open can continue and subsequently deliver a stream that nobody closes. Repeated cancellations can therefore leak streams and filesystem resources. I reproduced this: the caller received `InterruptedIOException`, then the future accepted a stream with zero close calls. Retain the future and arrange cleanup of any stream produced after abandonment, including completion races. Extend `testOpenForReadPropagatesInterrupt` to complete the future after interruption and assert that the resulting stream is closed. **Nonblocking suggestion** - **[P3] Restrict fallback to unsupported operations** — [[FSUtils.java:239–246](https://github.com/apache/hbase/blob/5038b2709e24cf3cc47d47ba7354b65665f7264c/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java#L239-L246)](https://github.com/apache/hbase/blob/5038b2709e24cf3cc47d47ba7354b65665f7264c/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java#L239-L246). Every `ExecutionException` currently triggers another open, including genuine I/O failures. Consider unwrapping the cause, falling back for unsupported functionality, and propagating other failures. This avoids repeating potentially expensive filesystem retries and preserves the original diagnostic. **Validation** Traced tracker registration, reader initialization, locality calculation, checksum fallback, links/references, and MOB readers. Locally, **72 tests across 11 relevant classes passed** on JDK 21/Hadoop 3.4.3. A separate delayed-future reproduction confirmed the cleanup issue above. No P0/P1 findings. -- 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]
