xiangfu0 commented on code in PR #19998:
URL: https://github.com/apache/pinot/pull/19998#discussion_r4420679845


##########
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/loader/LoaderTest.java:
##########
@@ -985,8 +985,9 @@ public void testVectorIndexLoad()
   private void verifyIndexDirIsV3(File indexDir) {
     File[] files = indexDir.listFiles();
     assertNotNull(files);
-    assertEquals(files.length, 1);
-    assertEquals(files[0].getName(), 
SegmentDirectoryPaths.V3_SUBDIRECTORY_NAME);
+    assertTrue(new File(indexDir, 
SegmentDirectoryPaths.V3_SUBDIRECTORY_NAME).isDirectory());
+    // Serving a sealed segment also writes a versioned metadata sidecar 
beside the v3 index directory.
+    assertEquals(files.length, new File(indexDir, 
"segment_metadata.bin").isFile() ? 2 : 1);

Review Comment:
   This is the one file where the PR's edits and an upstream refactor of the 
same test interleaved in the merge — checked the result and the merged 
assertion still reads correctly: the v3 directory check is structural and the 
file count tolerates the sidecar's presence or absence, which is the right 
shape now that serving loads may write segment_metadata.bin beside v3/. Clean 
interleave, nothing to fix.



-- 
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]

Reply via email to