You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2022/10/03 03:57:04 UTC

[pinot] branch master updated: Add docId and column name to segment read exception (#9512)

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 421154f1d9 Add docId and column name to segment read exception (#9512)
421154f1d9 is described below

commit 421154f1d9450ef813da6806c28d6fad7c500ec6
Author: Kartik Khare <kh...@gmail.com>
AuthorDate: Mon Oct 3 09:26:59 2022 +0530

    Add docId and column name to segment read exception (#9512)
---
 .../segment/local/indexsegment/immutable/ImmutableSegmentImpl.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java
index b4fafbbc23..c84454a041 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java
@@ -229,7 +229,8 @@ public class ImmutableSegmentImpl implements ImmutableSegment {
       _pinotSegmentRecordReader.getRecord(reuse, docId);
       return reuse;
     } catch (Exception e) {
-      throw new RuntimeException("Failed to use PinotSegmentRecordReader to read immutable segment");
+      throw new RuntimeException(
+          String.format("Failed to use PinotSegmentRecordReader to read immutable segment for docId: %d", docId), e);
     }
   }
 
@@ -242,7 +243,9 @@ public class ImmutableSegmentImpl implements ImmutableSegment {
       }
       return _pinotSegmentRecordReader.getValue(docId, column);
     } catch (Exception e) {
-      throw new RuntimeException("Failed to use PinotSegmentRecordReader to read value from immutable segment");
+      throw new RuntimeException(
+          String.format("Failed to use PinotSegmentRecordReader to read value from immutable segment"
+              + " for docId: %d, column: %s", docId, column), e);
     }
   }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org