Skip to content

Commit 22b3b6f

Browse files
authored
fix: add IVF_ON_DISK case to VectorIndexUtils.getIndexFileExtension() (#18176)
IVF_ON_DISK segments failed to load on the server with "Unsupported vector backend type: IVF_ON_DISK" because getIndexFileExtension() had no case for IVF_ON_DISK. IVF_ON_DISK reuses the IVF_FLAT binary file format at build time and uses FileChannel random-access reads at query time, so it should return VECTOR_IVF_FLAT_INDEX_FILE_EXTENSION, consistent with how SegmentDirectoryPaths.findVectorIndexIndexFile() already handles IVF_ON_DISK.
1 parent 6fc035f commit 22b3b6f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/VectorIndexUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ public static String getIndexFileExtension(VectorBackendType backendType) {
9898
return Indexes.VECTOR_IVF_FLAT_INDEX_FILE_EXTENSION;
9999
case IVF_PQ:
100100
return Indexes.VECTOR_IVF_PQ_INDEX_FILE_EXTENSION;
101+
case IVF_ON_DISK:
102+
// IVF_ON_DISK reuses the IVF_FLAT file format with FileChannel random-access reads
103+
return Indexes.VECTOR_IVF_FLAT_INDEX_FILE_EXTENSION;
101104
default:
102105
throw new IllegalStateException("Unsupported vector backend type: " + backendType);
103106
}

0 commit comments

Comments
 (0)