Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Remove FileWatcher from KNN (#2182) #2225

Conversation

0ctopus13prime
Copy link
Contributor

@0ctopus13prime 0ctopus13prime commented Oct 21, 2024

Signed-off-by: Dooyong Kim [email protected]

backporting from #2182

@0ctopus13prime 0ctopus13prime mentioned this pull request Oct 21, 2024
5 tasks
@naveentatikonda naveentatikonda changed the title Remove FileWatcher from KNN (#2182) [Backport 2.x] Remove FileWatcher from KNN (#2182) Oct 21, 2024
@0ctopus13prime
Copy link
Contributor Author

0ctopus13prime commented Oct 22, 2024

The last test failed because in Linux, it creates two segments while we are expecting three files will be created in a single segment.
Will update the commit after fixed it to always generate one single segment, so that file name querying will match the number of vector fields.

In testNativeEngineVectorFormat_whenMultipleVectorFieldIndexed_thenSuccess

...

IndexSearcher searcher = new IndexSearcher(indexReader);
final LeafReader leafReader = searcher.getLeafContexts().get(0).reader();
SegmentReader segmentReader = Lucene.segmentReader(leafReader);
final List<String> hnswfiles = getFilesFromSegment(dir, FAISS_ENGINE_FILE_EXT);
assertEquals(3, hnswfiles.size()); <--------- THIS!! Unlike other platform, Linux create two segments.


In Mac, created files in segment 0 : [_0_165_byte_field.faiss, _0_165_float_binary_field.faiss, _0_165_float_field.faiss]
In Linux, two segments were created (e.g. 0 + 1) : [_0_165_byte_field.faiss, _0_165_float_binary_field.faiss, _0_165_float_field.faiss, _1_165_float_binary_field]

Therefore, the test is not failing because of the change. Will fix the test.

Signed-off-by: Dooyong Kim <[email protected]>

(cherry picked from commit e5599aa)
@naveentatikonda naveentatikonda merged commit ee00593 into opensearch-project:2.x Oct 22, 2024
94 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants