-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Decrease store refcount on any failure to create NRTReplicationEngine #9796
Decrease store refcount on any failure to create NRTReplicationEngine #9796
Conversation
Compatibility status:Checks if related components are compatible with change 8d37065 Incompatible componentsIncompatible components: [https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/neural-search.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git] |
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #9796 +/- ##
============================================
+ Coverage 71.02% 71.04% +0.01%
- Complexity 58040 58085 +45
============================================
Files 4831 4831
Lines 273927 273931 +4
Branches 39913 39915 +2
============================================
+ Hits 194567 194604 +37
+ Misses 63061 62985 -76
- Partials 16299 16342 +43
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could you help add tests for this change?
server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java
Show resolved
Hide resolved
Compatibility status:Checks if related components are compatible with change 6055d8c Incompatible componentsIncompatible components: [https://github.com/opensearch-project/cross-cluster-replication.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git] |
server/src/test/java/org/opensearch/index/engine/NRTReplicationEngineTests.java
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:Checks if related components are compatible with change 7be0ba7 Incompatible componentsIncompatible components: [https://github.com/opensearch-project/cross-cluster-replication.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/reporting.git] |
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
7be0ba7
to
f9ad560
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:Checks if related components are compatible with change f9ad560 Incompatible componentsIncompatible components: [https://github.com/opensearch-project/cross-cluster-replication.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git] |
Gradle Check (Jenkins) Run Completed with:
|
…#9796) * Decrease store refcount on any failure to create NRTReplicationEngine Signed-off-by: Sachin Kale <kalsac@amazon.com> * Add unit tests Signed-off-by: Sachin Kale <kalsac@amazon.com> * Fix spotless Signed-off-by: Sachin Kale <kalsac@amazon.com> --------- Signed-off-by: Sachin Kale <kalsac@amazon.com> Co-authored-by: Sachin Kale <kalsac@amazon.com> (cherry picked from commit 199123d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…#9796) * Decrease store refcount on any failure to create NRTReplicationEngine Signed-off-by: Sachin Kale <kalsac@amazon.com> * Add unit tests Signed-off-by: Sachin Kale <kalsac@amazon.com> * Fix spotless Signed-off-by: Sachin Kale <kalsac@amazon.com> --------- Signed-off-by: Sachin Kale <kalsac@amazon.com> Co-authored-by: Sachin Kale <kalsac@amazon.com> (cherry picked from commit 199123d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…opensearch-project#9796) * Decrease store refcount on any failure to create NRTReplicationEngine Signed-off-by: Sachin Kale <kalsac@amazon.com> * Add unit tests Signed-off-by: Sachin Kale <kalsac@amazon.com> * Fix spotless Signed-off-by: Sachin Kale <kalsac@amazon.com> --------- Signed-off-by: Sachin Kale <kalsac@amazon.com> Co-authored-by: Sachin Kale <kalsac@amazon.com>
…opensearch-project#9796) * Decrease store refcount on any failure to create NRTReplicationEngine Signed-off-by: Sachin Kale <kalsac@amazon.com> * Add unit tests Signed-off-by: Sachin Kale <kalsac@amazon.com> * Fix spotless Signed-off-by: Sachin Kale <kalsac@amazon.com> --------- Signed-off-by: Sachin Kale <kalsac@amazon.com> Co-authored-by: Sachin Kale <kalsac@amazon.com>
…opensearch-project#9796) * Decrease store refcount on any failure to create NRTReplicationEngine Signed-off-by: Sachin Kale <kalsac@amazon.com> * Add unit tests Signed-off-by: Sachin Kale <kalsac@amazon.com> * Fix spotless Signed-off-by: Sachin Kale <kalsac@amazon.com> --------- Signed-off-by: Sachin Kale <kalsac@amazon.com> Co-authored-by: Sachin Kale <kalsac@amazon.com> Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…opensearch-project#9796) * Decrease store refcount on any failure to create NRTReplicationEngine Signed-off-by: Sachin Kale <kalsac@amazon.com> * Add unit tests Signed-off-by: Sachin Kale <kalsac@amazon.com> * Fix spotless Signed-off-by: Sachin Kale <kalsac@amazon.com> --------- Signed-off-by: Sachin Kale <kalsac@amazon.com> Co-authored-by: Sachin Kale <kalsac@amazon.com>
…opensearch-project#9796) * Decrease store refcount on any failure to create NRTReplicationEngine Signed-off-by: Sachin Kale <kalsac@amazon.com> * Add unit tests Signed-off-by: Sachin Kale <kalsac@amazon.com> * Fix spotless Signed-off-by: Sachin Kale <kalsac@amazon.com> --------- Signed-off-by: Sachin Kale <kalsac@amazon.com> Co-authored-by: Sachin Kale <kalsac@amazon.com> Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
…opensearch-project#9796) * Decrease store refcount on any failure to create NRTReplicationEngine Signed-off-by: Sachin Kale <kalsac@amazon.com> * Add unit tests Signed-off-by: Sachin Kale <kalsac@amazon.com> * Fix spotless Signed-off-by: Sachin Kale <kalsac@amazon.com> --------- Signed-off-by: Sachin Kale <kalsac@amazon.com> Co-authored-by: Sachin Kale <kalsac@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
store.incRef()
in the constructor and correspondingstore.decRef()
is only called on IOException.TranslogCorruptedException
, store is not de-referenced causing ShardLock issues.store.decRef()
if there is a failure in creating NRTReplicationEngine.Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.