You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2026/08/18 18:22:54 UTC
(pinot) branch master updated: Replace production `assert` with an explicit null/empty check in RealtimeSegmentDataManager (#19261)
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 <de...@meta.com>
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org