KKcorps commented on code in PR #9604:
URL: https://github.com/apache/pinot/pull/9604#discussion_r997375255
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java:
##########
@@ -283,31 +276,22 @@ public ThreadSafeMutableRoaringBitmap getValidDocIds() {
@Override
public GenericRow getRecord(int docId, GenericRow reuse) {
- try {
- if (_pinotSegmentRecordReader == null) {
- _pinotSegmentRecordReader = new PinotSegmentRecordReader();
- _pinotSegmentRecordReader.init(this);
- }
- _pinotSegmentRecordReader.getRecord(reuse, docId);
+ try (PinotSegmentRecordReader recordReader = new
PinotSegmentRecordReader()) {
Review Comment:
But partial upsert is used by a lot of users. can we instead implement
another method where we can pass a segment reader?
then we can simply init and close that reader outside the segment
--
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]