You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Akanksha-kedia (via GitHub)" <gi...@apache.org> on 2025/10/30 04:42:39 UTC
[PR] Enhanced the close() method with defensive null checks to prevent NullPointerException during resource cleanup [pinot]
Akanksha-kedia opened a new pull request, #17110:
URL: https://github.com/apache/pinot/pull/17110
### File Modified: `FixedByteSingleValueMultiColumnReaderWriter.java`
__Location__: `pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/readerwriter/impl/FixedByteSingleValueMultiColumnReaderWriter.java`
__Improvement__: Enhanced the `close()` method with defensive null checks to prevent NullPointerException during resource cleanup.
__Before__:
```java
@Override
public void close() throws IOException {
for (FixedByteSingleValueMultiColWriter writer : _writers) {
writer.close();
}
for (FixedByteSingleValueMultiColReader reader : _readers) {
reader.close();
}
}
```
__After__:
```java
@Override
public void close() throws IOException {
if (_writers != null) {
for (FixedByteSingleValueMultiColWriter writer : _writers) {
if (writer != null) {
writer.close();
}
}
}
if (_readers != null) {
for (FixedByteSingleValueMultiColReader reader : _readers) {
if (reader != null) {
reader.close();
}
}
}
}
```
## Impact
✅ __Prevents NullPointerException__ during resource cleanup\
✅ __Improves robustness__ of the close() method\
✅ __Follows defensive programming best practices__\
✅ __No functional changes__ to normal operation\
✅ __Low risk__ - purely defensive improvement
--
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@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enhanced the close() method with defensive null checks to prevent NullPointerException during resource cleanup [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #17110:
URL: https://github.com/apache/pinot/pull/17110#issuecomment-3467518353
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/17110?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `10 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 56.19%. Comparing base ([`eb4c342`](https://app.codecov.io/gh/apache/pinot/commit/eb4c34299834ede4203e57cac717e68be8bc8ae9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c016bbf`](https://app.codecov.io/gh/apache/pinot/commit/c016bbfbb2542254855f51f70ad4e55ec227a449?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/17110?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...l/FixedByteSingleValueMultiColumnReaderWriter.java](https://app.codecov.io/gh/apache/pinot/pull/17110?src=pr&el=tree&filepath=pinot-segment-local%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fsegment%2Flocal%2Fio%2Freaderwriter%2Fimpl%2FFixedByteSingleValueMultiColumnReaderWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9pby9yZWFkZXJ3cml0ZXIvaW1wbC9GaXhlZEJ5dGVTaW5nbGVWYWx1ZU11bHRpQ29sdW1uUmVhZGVyV3JpdGVyLmphdmE=) | 0.00% | [10 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/17110?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (eb4c342) and HEAD (c016bbf). Click for more details.
>
> <details><summary>HEAD has 36 uploads less than BASE</summary>
>
>| Flag | BASE (eb4c342) | HEAD (c016bbf) |
>|------|------|------|
>|unittests1|2|1|
>|unittests|4|1|
>|java-11|5|0|
>|temurin|10|1|
>|java-21|5|1|
>|unittests2|2|0|
>|integration|6|0|
>|integration2|2|0|
>|integration1|2|0|
>|custom-integration1|2|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #17110 +/- ##
============================================
- Coverage 63.24% 56.19% -7.06%
+ Complexity 1428 701 -727
============================================
Files 3104 2420 -684
Lines 183423 135371 -48052
Branches 28112 21634 -6478
============================================
- Hits 116010 76067 -39943
+ Misses 58442 52915 -5527
+ Partials 8971 6389 -2582
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-11](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.19% <0.00%> (-7.00%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.19% <0.00%> (-7.06%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.19% <0.00%> (-7.06%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.19% <0.00%> (-0.03%)` | :arrow_down: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/17110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/17110?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enhanced the close() method with defensive null checks to prevent NullPointerException during resource cleanup [pinot]
Posted by "Akanksha-kedia (via GitHub)" <gi...@apache.org>.
Akanksha-kedia closed pull request #17110: Enhanced the close() method with defensive null checks to prevent NullPointerException during resource cleanup
URL: https://github.com/apache/pinot/pull/17110
--
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@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enhanced the close() method with defensive null checks to prevent NullPointerException during resource cleanup [pinot]
Posted by "Akanksha-kedia (via GitHub)" <gi...@apache.org>.
Akanksha-kedia commented on PR #17110:
URL: https://github.com/apache/pinot/pull/17110#issuecomment-3466111452
@xiangfu0 please review
--
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@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org