Skip to content

Commit 91d66eb

Browse files
rchitale7sam-hermanVijayanBopensearch-trigger-bot[bot]peterzhuamazon
authored
[Remote Vector Index Build] Initial implementation of Index Build Service (#2532)
* fix broken build flag, move build to one directory (#2442) * move build to one directory, fix broken flag Signed-off-by: Samuel Herman <[email protected]> * fix make path Signed-off-by: Samuel Herman <[email protected]> * changelog update Signed-off-by: Samuel Herman <[email protected]> * add fix for classpath change and for cmake discovery on macos Signed-off-by: Samuel Herman <[email protected]> * fix make discovery for gradle Signed-off-by: Samuel Herman <[email protected]> * fix cmake path for macOS Signed-off-by: Samuel Herman <[email protected]> --------- Signed-off-by: Samuel Herman <[email protected]> * Update package name to fix compilation issue (#2513) * Update package name to fix compilation issue Core renamed this package in opensearch-project/OpenSearch#17272 This commit renames package accordingly Signed-off-by: Balasubramanian <[email protected]> * Update build.gradle and build.sh to separate x64 linux nmslib build with different gcc versions (#2506) (#2508) * Update build gradle to separate nmslib / faiss generation Signed-off-by: Peter Zhu <[email protected]> * Update scripts/build.sh to separate enable gcc switch Signed-off-by: Peter Zhu <[email protected]> * Remove test comments Signed-off-by: Peter Zhu <[email protected]> * Remove test comments Signed-off-by: Peter Zhu <[email protected]> * Remove test comments Signed-off-by: Peter Zhu <[email protected]> * Updating restart and rolling upgrade bwc test bundle.gradle Signed-off-by: Peter Zhu <[email protected]> * Enforce gcc10 for nmslib to compile and avx512_spr have no-op Signed-off-by: Peter Zhu <[email protected]> --------- Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 107c4f1) Co-authored-by: Peter Zhu <[email protected]> --------- Signed-off-by: Balasubramanian <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Peter Zhu <[email protected]> * Adds debug logs for KNNQuery and KNNWeight (#2466) (#2470) * Adds debug logs for KNNQuery and KNNWeight Signed-off-by: Tejas Shah <[email protected]> * Adds check to see if log is enabled to start and stop StopWatch Signed-off-by: Tejas Shah <[email protected]> * Addressing comments on the PR Signed-off-by: Tejas Shah <[email protected]> * Adds shard and segment info in the logs Signed-off-by: Tejas Shah <[email protected]> * Removes unnecessary segment name param from exact search Signed-off-by: Tejas Shah <[email protected]> * Fixes the build Signed-off-by: Tejas Shah <[email protected]> --------- Signed-off-by: Tejas Shah <[email protected]> (cherry picked from commit f322e27) Co-authored-by: Tejas Shah <[email protected]> * Clean JNI artifacts with ./gradlew clean (#2516) * clean JNI artifacts with ./gradlew clean Signed-off-by: Samuel Herman <[email protected]> * nest release under build directory Signed-off-by: Samuel Herman <[email protected]> * adjust all references to the old release path Signed-off-by: Samuel Herman <[email protected]> * remove irrelevant paths from gitignore, add jni/build Signed-off-by: Samuel Herman <[email protected]> * fix logging on linux Signed-off-by: Samuel Herman <[email protected]> --------- Signed-off-by: Samuel Herman <[email protected]> * Backport to main (#2520) * Remove skip building graph check for quantization use case (#2430) For quantization indices, we don't have to apply building graph check since it is already faster, this is now only applied for fp32/16 indices and where threshold is configured. Signed-off-by: Vijayan Balasubramanian <[email protected]> * Update default to 0 to always build graph as default behavior (#2452) Signed-off-by: Balasubramanian <[email protected]> * Update changelog Signed-off-by: Balasubramanian <[email protected]> --------- Signed-off-by: Vijayan Balasubramanian <[email protected]> Signed-off-by: Balasubramanian <[email protected]> * [Backport main] Add release notes for 2.19.0 (#2503) * Add release notes for 2.19.0 Signed-off-by: Kunal Kotwani <[email protected]> * Fix links for release notes Co-authored-by: John Mazanec <[email protected]> Signed-off-by: Kunal Kotwani <[email protected]> --------- Signed-off-by: Kunal Kotwani <[email protected]> Co-authored-by: John Mazanec <[email protected]> * Fix main knnlib dir in build script based on #2442 (#2526) Signed-off-by: Peter Zhu <[email protected]> * Minor performance improvments in KNNQueryBuilder (#2528) Signed-off-by: Tejas Shah <[email protected]> * Initial implementation of control flow Signed-off-by: Rohan Chitale <[email protected]> --------- Signed-off-by: Samuel Herman <[email protected]> Signed-off-by: Balasubramanian <[email protected]> Signed-off-by: Vijayan Balasubramanian <[email protected]> Signed-off-by: Kunal Kotwani <[email protected]> Signed-off-by: Peter Zhu <[email protected]> Signed-off-by: Tejas Shah <[email protected]> Signed-off-by: Rohan Chitale <[email protected]> Co-authored-by: sam-herman <[email protected]> Co-authored-by: Vijayan Balasubramanian <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Peter Zhu <[email protected]> Co-authored-by: Tejas Shah <[email protected]> Co-authored-by: Kunal Kotwani <[email protected]> Co-authored-by: John Mazanec <[email protected]>
1 parent 55652ca commit 91d66eb

File tree

72 files changed

+1196
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1196
-158
lines changed

.github/workflows/CI.yml

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
matrix:
4141
java: [21, 23]
4242

43+
env:
44+
CC: gcc10-gcc
45+
CXX: gcc10-g++
46+
FC: gcc10-gfortran
47+
4348
name: Build and Test k-NN Plugin on Linux
4449
runs-on: ubuntu-latest
4550
needs: Get-CI-Image-Tag

.github/workflows/test_security.yml

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
strategy:
4040
matrix:
4141
java: [21]
42+
env:
43+
CC: gcc10-gcc
44+
CXX: gcc10-g++
45+
FC: gcc10-gfortran
4246

4347
name: Run Integration Tests on Linux
4448
runs-on: ubuntu-latest

.gitignore

+1-16
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,11 @@ out/
1414
oss/*
1515
*.iml
1616

17-
jni/CMakeCache.txt
18-
jni/CMakeFiles
19-
jni/Makefile
20-
jni/cmake_install.cmake
21-
jni/release
22-
jni/packages
23-
jni/CTestTestfile.cmake
24-
jni/KNNPlugin_JNI.cbp
2517
jni/Testing/
26-
jni/_deps/
2718
jni/bin/
28-
jni/lib/
29-
jni/jni_test*
30-
jni/googletest*
19+
jni/build/
3120
jni/cmake/*.cmake-e
32-
jni/.cmake
3321
jni/.idea
34-
jni/build.ninja
35-
jni/.ninja_deps
36-
jni/.ninja_log
3722

3823
benchmarks/perf-tool/okpt/output
3924
benchmarks/perf-tool/okpt/dev

CHANGELOG.md

+3-36
Original file line numberDiff line numberDiff line change
@@ -13,50 +13,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1313
* Upgrade min JDK compatibility to JDK 21 [#2422](https://github.com/opensearch-project/k-NN/pull/2422)
1414
### Documentation
1515
### Maintenance
16+
* Update package name to fix compilation issue [#2513](https://github.com/opensearch-project/k-NN/pull/2513)
1617
### Refactoring
1718

18-
## [Unreleased 2.x](https://github.com/opensearch-project/k-NN/compare/2.18...2.x)
19+
## [Unreleased 2.x](https://github.com/opensearch-project/k-NN/compare/2.19...2.x)
1920
### Features
20-
- Add Support for Multi Values in innerHit for Nested k-NN Fields in Lucene and FAISS (#2283)[https://github.com/opensearch-project/k-NN/pull/2283]
21-
- Add binary index support for Lucene engine. (#2292)[https://github.com/opensearch-project/k-NN/pull/2292]
22-
- Add expand_nested_docs Parameter support to NMSLIB engine (#2331)[https://github.com/opensearch-project/k-NN/pull/2331]
23-
- Add a new build mode, `FAISS_OPT_LEVEL=avx512_spr`, which enables the use of advanced AVX-512 instructions introduced with Intel(R) Sapphire Rapids (#2404)[https://github.com/opensearch-project/k-NN/pull/2404]
24-
- Add cosine similarity support for faiss engine (#2376)[https://github.com/opensearch-project/k-NN/pull/2376]
25-
- Add derived source feature for vector fields (#2449)[https://github.com/opensearch-project/k-NN/pull/2449]
2621
### Enhancements
27-
- Introduced a writing layer in native engines where relies on the writing interface to process IO. (#2241)[https://github.com/opensearch-project/k-NN/pull/2241]
28-
- Allow method parameter override for training based indices (#2290) https://github.com/opensearch-project/k-NN/pull/2290]
29-
- Optimizes lucene query execution to prevent unnecessary rewrites (#2305)[https://github.com/opensearch-project/k-NN/pull/2305]
30-
- Add check to directly use ANN Search when filters match all docs. (#2320)[https://github.com/opensearch-project/k-NN/pull/2320]
31-
- Use one formula to calculate cosine similarity (#2357)[https://github.com/opensearch-project/k-NN/pull/2357]
32-
- Add WithFieldName implementation to KNNQueryBuilder (#2398)[https://github.com/opensearch-project/k-NN/pull/2398]
33-
- Make the build work for M series MacOS without manual code changes and local JAVA_HOME config (#2397)[https://github.com/opensearch-project/k-NN/pull/2397]
34-
- Enabled concurrent graph creation for Lucene engine with index thread qty settings(#2480)[https://github.com/opensearch-project/k-NN/pull/2480]
35-
- Remove DocsWithFieldSet reference from NativeEngineFieldVectorsWriter (#2408)[https://github.com/opensearch-project/k-NN/pull/2408]
3622
### Bug Fixes
37-
* Fixing the bug when a segment has no vector field present for disk based vector search (#2282)[https://github.com/opensearch-project/k-NN/pull/2282]
38-
* Fixing the bug where search fails with "fields" parameter for an index with a knn_vector field (#2314)[https://github.com/opensearch-project/k-NN/pull/2314]
39-
* Fix for NPE while merging segments after all the vector fields docs are deleted (#2365)[https://github.com/opensearch-project/k-NN/pull/2365]
40-
* Allow validation for non knn index only after 2.17.0 (#2315)[https://github.com/opensearch-project/k-NN/pull/2315]
41-
* Fixing the bug to prevent updating the index.knn setting after index creation(#2348)[https://github.com/opensearch-project/k-NN/pull/2348]
42-
* Release query vector memory after execution (#2346)[https://github.com/opensearch-project/k-NN/pull/2346]
43-
* Fix shard level rescoring disabled setting flag (#2352)[https://github.com/opensearch-project/k-NN/pull/2352]
44-
* Fix filter rewrite logic which was resulting in getting inconsistent / incorrect results for cases where filter was getting rewritten for shards (#2359)[https://github.com/opensearch-project/k-NN/pull/2359]
45-
* Fixing it to retrieve space_type from index setting when both method and top level don't have the value. [#2374](https://github.com/opensearch-project/k-NN/pull/2374)
46-
* Fixing the bug where setting rescore as false for on_disk knn_vector query is a no-op (#2399)[https://github.com/opensearch-project/k-NN/pull/2399]
47-
* Fixing bug where mapping accepts both dimension and model-id (#2410)[https://github.com/opensearch-project/k-NN/pull/2410]
48-
* Add version check for full field name validation (#2477)[https://github.com/opensearch-project/k-NN/pull/2477]
4923
### Infrastructure
50-
* Updated C++ version in JNI from c++11 to c++17 [#2259](https://github.com/opensearch-project/k-NN/pull/2259)
51-
* Upgrade bytebuddy and objenesis version to match OpenSearch core and, update github ci runner for macos [#2279](https://github.com/opensearch-project/k-NN/pull/2279)
5224
### Documentation
5325
### Maintenance
54-
* Select index settings based on cluster version[2236](https://github.com/opensearch-project/k-NN/pull/2236)
55-
* Added periodic cache maintenance for QuantizationStateCache and NativeMemoryCache [#2308](https://github.com/opensearch-project/k-NN/pull/2308)
56-
* Added null checks for fieldInfo in ExactSearcher to avoid NPE while running exact search for segments with no vector field (#2278)[https://github.com/opensearch-project/k-NN/pull/2278]
57-
* Added Lucene BWC tests (#2313)[https://github.com/opensearch-project/k-NN/pull/2313]
58-
* Upgrade jsonpath from 2.8.0 to 2.9.0[2325](https://github.com/opensearch-project/k-NN/pull/2325)
59-
* Bump Faiss commit from 1f42e81 to 0cbc2a8 to accelerate hamming distance calculation using _mm512_popcnt_epi64 intrinsic and also add avx512-fp16 instructions to boost performance [#2381](https://github.com/opensearch-project/k-NN/pull/2381)
6026
* Enabled indices.breaker.total.use_real_memory setting via build.gradle for integTest Cluster to catch heap CB in local ITs and github CI actions [#2395](https://github.com/opensearch-project/k-NN/pull/2395/)
6127
* Fixing Lucene912Codec Issue with BWC for Lucene 10.0.1 upgrade[#2429](https://github.com/opensearch-project/k-NN/pull/2429)
28+
* Enabled idempotency of local builds when using `./gradlew clean` and nest `jni/release` directory under `jni/build` for easier cleanup [#2516](https://github.com/opensearch-project/k-NN/pull/2516)
6229
### Refactoring

build.gradle

+94-12
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,52 @@ task windowsPatches(type:Exec) {
329329
commandLine 'cmd', '/c', "Powershell -File $rootDir\\scripts\\windowsScript.ps1"
330330
}
331331

332-
task cmakeJniLib(type:Exec) {
333-
workingDir 'jni'
332+
def findExecutable(String executableName, List<String> additionalPaths = []) {
333+
// Print the task's environment before setting it
334+
// Print PATH specifically
335+
logger.lifecycle("\nSystem PATH:")
336+
logger.lifecycle(System.getenv("PATH"))
337+
338+
def commonBasePaths = [
339+
"/opt/homebrew/bin",
340+
"/usr/local/bin",
341+
"/usr/bin"
342+
]
343+
344+
// Start with just the executable name (will use system PATH)
345+
def execPath = executableName
346+
347+
if (Os.isFamily(Os.FAMILY_MAC)) {
348+
def searchPaths = []
349+
// Add common paths
350+
commonBasePaths.each { basePath ->
351+
searchPaths.add("${basePath}/${executableName}")
352+
}
353+
// Add any additional specific paths
354+
searchPaths.addAll(additionalPaths)
355+
356+
for (path in searchPaths) {
357+
if (new File(path).exists()) {
358+
logger.lifecycle("Found ${executableName} at: ${path}")
359+
execPath = path
360+
break
361+
}
362+
}
363+
}
364+
365+
return execPath
366+
}
367+
368+
tasks.register('cmakeJniLib', Exec) {
369+
def cmakePath = findExecutable("cmake")
370+
logger.lifecycle("Using cmake at: ${cmakePath}")
371+
// Inherit the current environment
372+
environment System.getenv()
373+
334374
def args = []
335-
args.add("cmake")
336-
args.add(".")
375+
args.add(cmakePath)
376+
args.add("-S jni") // CMakelists.txt directory
377+
args.add("-B jni/build") // Build directory
337378
args.add("-DKNN_PLUGIN_VERSION=${opensearch_version}")
338379
args.add("-DAVX2_ENABLED=${avx2_enabled}")
339380
args.add("-DAVX512_ENABLED=${avx512_enabled}")
@@ -343,7 +384,7 @@ task cmakeJniLib(type:Exec) {
343384
def javaHome = Jvm.current().getJavaHome()
344385
logger.lifecycle("Java home directory used by gradle: $javaHome")
345386
if (Os.isFamily(Os.FAMILY_MAC)) {
346-
environment('JAVA_HOME',javaHome)
387+
environment('JAVA_HOME', javaHome)
347388
}
348389
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
349390
dependsOn windowsPatches
@@ -353,35 +394,75 @@ task cmakeJniLib(type:Exec) {
353394
args.add("-DLAPACK_LIBRARIES=$rootDir\\src\\main\\resources\\windowsDependencies\\libopenblas.dll")
354395
}
355396

397+
// Print the task's environment after setting it
398+
logger.lifecycle("\nTask Environment PATH:")
399+
logger.lifecycle(environment.get('PATH'))
400+
401+
// Print the command that will be executed
402+
logger.lifecycle("CMake command: ${args.join(' ')}")
403+
def outputStream = new ByteArrayOutputStream()
356404
commandLine args
405+
standardOutput = outputStream
406+
}
407+
408+
// Makes sure that `./gradlew clean` removes all JNI build artifacts
409+
tasks.clean.doFirst {
410+
// Delete JNI build directory
411+
delete "${projectDir}/jni/build"
412+
}
413+
414+
task buildNmslib(type:Exec) {
415+
dependsOn cmakeJniLib
416+
def cmakePath = findExecutable("cmake")
417+
logger.lifecycle("Using cmake at: ${cmakePath}")
418+
419+
if (cmakePath.isEmpty()) {
420+
throw new GradleException("CMake not found in PATH. Please install CMake.")
421+
}
422+
423+
commandLine cmakePath,
424+
'--build', 'jni/build',
425+
'--target', 'opensearchknn_nmslib',
426+
'--parallel', "${nproc_count}"
357427
}
358428

359429
task buildJniLib(type:Exec) {
360430
dependsOn cmakeJniLib
361-
workingDir 'jni'
362-
commandLine 'make', 'opensearchknn_nmslib', 'opensearchknn_faiss', 'opensearchknn_common', '-j', "${nproc_count}"
431+
def cmakePath = findExecutable("cmake")
432+
logger.lifecycle("Using cmake at: ${cmakePath}")
433+
434+
if (cmakePath.isEmpty()) {
435+
throw new GradleException("CMake not found in PATH. Please install CMake.")
436+
}
437+
438+
commandLine cmakePath,
439+
'--build', 'jni/build',
440+
'--target', 'opensearchknn_faiss', 'opensearchknn_common',
441+
'--parallel', "${nproc_count}"
363442
}
364443

365444
test {
445+
dependsOn buildNmslib
366446
dependsOn buildJniLib
367447
systemProperty 'tests.security.manager', 'false'
368-
systemProperty "java.library.path", "$rootDir/jni/release"
448+
systemProperty "java.library.path", "$rootDir/jni/build/release"
369449
//this change enables mockito-inline that supports mocking of static classes/calls
370450
systemProperty "jdk.attach.allowAttachSelf", true
371451
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
372452
// Add the paths of built JNI libraries and its dependent libraries to PATH variable in System variables
373-
environment('PATH', System.getenv('PATH') + ";$rootDir/jni/release" + ";$rootDir/src/main/resources/windowsDependencies")
453+
environment('PATH', System.getenv('PATH') + ";$rootDir/jni/build/release" + ";$rootDir/src/main/resources/windowsDependencies")
374454
}
375455
}
376456

377457
def _numNodes = findProperty('numNodes') as Integer ?: 1
378458
integTest {
379459
if (integTestDependOnJniLib) {
460+
dependsOn buildNmslib
380461
dependsOn buildJniLib
381462
}
382463
systemProperty 'tests.security.manager', 'false'
383464
systemProperty 'java.io.tmpdir', opensearch_tmp_dir.absolutePath
384-
systemProperty "java.library.path", "$rootDir/jni/release"
465+
systemProperty "java.library.path", "$rootDir/jni/build/release"
385466
// allows integration test classes to access test resource from project root path
386467
systemProperty('project.root', project.rootDir.absolutePath)
387468

@@ -433,7 +514,7 @@ testClusters.integTest {
433514
plugin(project.tasks.bundlePlugin.archiveFile)
434515
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
435516
// Add the paths of built JNI libraries and its dependent libraries to PATH variable in System variables
436-
environment('PATH', System.getenv('PATH') + ";$rootDir/jni/release" + ";$rootDir/src/main/resources/windowsDependencies")
517+
environment('PATH', System.getenv('PATH') + ";$rootDir/jni/build/release" + ";$rootDir/src/main/resources/windowsDependencies")
437518
}
438519

439520
// Cluster shrink exception thrown if we try to set numberOfNodes to 1, so only apply if > 1
@@ -448,7 +529,7 @@ testClusters.integTest {
448529
debugPort += 1
449530
}
450531
}
451-
systemProperty("java.library.path", "$rootDir/jni/release")
532+
systemProperty("java.library.path", "$rootDir/jni/build/release")
452533
systemProperty propertyKeys.breaker.useRealMemory, getBreakerSetting()
453534
}
454535

@@ -475,6 +556,7 @@ task integTestRemote(type: RestIntegTestTask) {
475556

476557
run {
477558
useCluster project.testClusters.integTest
559+
dependsOn buildNmslib
478560
dependsOn buildJniLib
479561
doFirst {
480562
// There seems to be an issue when running multi node run or integ tasks with unicast_hosts

jni/cmake/init-faiss.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ endif()
111111
if(NOT DEFINED AVX512_SPR_ENABLED)
112112
# Check if the system is Intel(R) Sapphire Rapids or a newer-generation processor
113113
execute_process(COMMAND bash -c "lscpu | grep -q 'GenuineIntel' && lscpu | grep -i 'avx512_fp16' | grep -i 'avx512_bf16' | grep -i 'avx512_vpopcntdq'" OUTPUT_VARIABLE SPR_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
114-
if (AND NOT "${SPR_FLAGS}" STREQUAL "")
115-
set(AVX512_SPR_ENABLED true)
114+
if (NOT "${SPR_FLAGS}" STREQUAL "")
115+
set(AVX512_SPR_ENABLED true)
116116
else()
117-
set(AVX512_SPR_ENABLED false)
117+
set(AVX512_SPR_ENABLED false)
118118
endif()
119119
endif()
120120

jni/cmake/macros.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ macro(opensearch_set_common_properties TARGET)
99

1010
if (NOT "${WIN32}" STREQUAL "")
1111
# Use RUNTIME_OUTPUT_DIRECTORY, to build the target library in the specified directory at runtime.
12-
set_target_properties(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/release)
12+
set_target_properties(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release)
1313
else()
14-
set_target_properties(${TARGET} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/release)
14+
set_target_properties(${TARGET} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release)
1515
endif()
1616
endmacro()

jni/external/faiss

Submodule faiss updated from 0cbc2a8 to c162b33

jni/external/nmslib

qa/restart-upgrade/build.gradle

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ testClusters {
2626
environment "LD_LIBRARY_PATH", "${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/knnlib;${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/lib"
2727
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
2828
// While running on Windows OS, setting the PATH environment variable to include the paths to dlls of JNI libraries and windows dependencies
29-
environment('PATH', System.getenv('PATH') + ";$rootDir/jni/release" + ";$rootDir/src/main/resources/windowsDependencies")
29+
environment('PATH', System.getenv('PATH') + ";$rootDir/jni/build/release" + ";$rootDir/src/main/resources/windowsDependencies")
3030
systemProperty "java.library.path", "${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/knnlib;${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/lib"
3131
} else {
3232
systemProperty "java.library.path", "${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/knnlib:${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/lib"
@@ -135,12 +135,13 @@ testClusters {
135135
// All nodes are upgraded to latest version and run the tests
136136
task testRestartUpgrade(type: StandaloneRestIntegTestTask) {
137137
dependsOn "testAgainstOldCluster"
138+
dependsOn rootProject.tasks.buildNmslib
138139
dependsOn rootProject.tasks.buildJniLib
139140
dependsOn rootProject.tasks.assemble
140141
useCluster testClusters."${baseName}"
141142
doFirst {
142-
testClusters."${baseName}".environment("LD_LIBRARY_PATH", "$rootDir/jni/release")
143-
testClusters."${baseName}".systemProperty("java.library.path", "$rootDir/jni/release")
143+
testClusters."${baseName}".environment("LD_LIBRARY_PATH", "$rootDir/jni/build/release")
144+
testClusters."${baseName}".systemProperty("java.library.path", "$rootDir/jni/build/release")
144145
testClusters."${baseName}".upgradeAllNodesAndPluginsToNextVersion([rootProject.tasks.bundlePlugin.archiveFile])
145146
}
146147
systemProperty 'tests.rest.bwcsuite_cluster', 'upgraded_cluster'

0 commit comments

Comments
 (0)