opensearch-project / k-NN

🆕 Find the k-nearest neighbors (k-NN) for your vector data
https://opensearch.org/docs/latest/search-plugins/knn/index/
Apache License 2.0
152 stars 113 forks source link

[Maintainence] Enable indices.breaker.total.use_real_memory setting while via build.gradle for integTest Cluster to catch heap CB. #2114

Open navneet1v opened 1 week ago

navneet1v commented 1 week ago

Background

Currently in opensearch plugins use ./gradlew :integTest to run the ITs on local and also on the CIs. The commands create a local cluster and run the tests against it. On this local cluster CBs are disabled. Ref: https://github.com/opensearch-project/OpenSearch/blob/767c07f46d361a991b3b6ea2afc2ac501f63b04e/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchNode.java#L1179-L1182

Due to this what happens is if there is some issues in the code that didn't get caught during CIs. This issue recently happened with k-NN plugin where in of the flow plugin was creating some large objects which was not required(Fix PR: https://github.com/opensearch-project/k-NN/pull/2070). But none of the CIs were able to caught this and it was caught during the Jenkins IT runs as those runs happen remote cluster built using the generated distribution where the setting indices.breaker.total.use_real_memory is marked as true. In test cluster that gets created during CIs has this setting as False. Ref: https://github.com/opensearch-project/OpenSearch/blob/767c07f46d361a991b3b6ea2afc2ac501f63b04e/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchNode.java#L1179-L1182

What Needs to be done

With this gh issue: https://github.com/opensearch-project/OpenSearch/issues/15849, Opensearch now supports overriding indices.breaker.total.use_real_memory in integTest cluster. We should enable this setting to ensure that CIs and local integ test now start to run with heap CB enabled.