This is an automated email from the ASF dual-hosted git repository.
Jackie-Jiang 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 54045fca3e5 Replace production `assert` with an explicit null/empty
check in RealtimeSegmentDataManager (#19261)
54045fca3e5 is described below
commit 54045fca3e5e9449ba10092e013ab2b1badb6de1
Author: Deepak kumar <[email protected]>
AuthorDate: Tue Aug 18 11:22:47 2026 -0700
Replace production `assert` with an explicit null/empty check in
RealtimeSegmentDataManager (#19261)
---
.../core/data/manager/realtime/RealtimeSegmentDataManager.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java
b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java
index c8df2d687f0..5beff4e116e 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java
@@ -1257,7 +1257,11 @@ public class RealtimeSegmentDataManager extends
SegmentDataManager {
FileUtils.deleteQuietly(indexDir);
File[] tempFiles = tempSegmentFolder.listFiles();
- assert tempFiles != null;
+ if (tempFiles == null || tempFiles.length == 0) {
+ String errorMessage = "Temp segment folder is empty or unreadable: " +
tempSegmentFolder;
+ reportSegmentBuildFailure(errorMessage, null);
+ throw new SegmentBuildFailureException(errorMessage);
+ }
File tempIndexDir = tempFiles[0];
try {
FileUtils.moveDirectory(tempIndexDir, indexDir);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]