[BUG FIX] Add reference count control in NRTReplicationEngine#acquireLastIndexCommit#19214
Conversation
|
❌ Gradle check result for ff2a581: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
ff2a581 to
b069d27
Compare
|
❌ Gradle check result for b069d27: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
b069d27 to
abe8112
Compare
|
❌ Gradle check result for abe8112: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java
Show resolved
Hide resolved
|
❌ Gradle check result for e469570: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
…managed by lock. Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
e469570 to
e622f98
Compare
|
❕ Gradle check result for e622f98: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
|
@guojialiang92 Can you add the CHANGELOG.txt? |
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
…ine-acquireLastIndexCommit-add-ref-count-control
|
❕ Gradle check result for 92a555c: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
@kkewwei |
…LastIndexCommit (opensearch-project#19214) * NRTReplicationEngine#acquireLastIndexCommit add ref count control Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * fix test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * the incRef in NRTReplicationEngine#commitSegmentInfos should also be managed by lock. Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * update test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * add change log Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> --------- Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
…LastIndexCommit (opensearch-project#19214) * NRTReplicationEngine#acquireLastIndexCommit add ref count control Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * fix test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * the incRef in NRTReplicationEngine#commitSegmentInfos should also be managed by lock. Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * update test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * add change log Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> --------- Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> Signed-off-by: Ankit Jain <jainankitk@apache.org>
…LastIndexCommit (opensearch-project#19214) * NRTReplicationEngine#acquireLastIndexCommit add ref count control Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * fix test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * the incRef in NRTReplicationEngine#commitSegmentInfos should also be managed by lock. Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * update test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * add change log Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> --------- Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> Signed-off-by: Ankit Jain <jainankitk@apache.org>
…LastIndexCommit (opensearch-project#19214) * NRTReplicationEngine#acquireLastIndexCommit add ref count control Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * fix test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * the incRef in NRTReplicationEngine#commitSegmentInfos should also be managed by lock. Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * update test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * add change log Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> --------- Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
…LastIndexCommit (opensearch-project#19214) * NRTReplicationEngine#acquireLastIndexCommit add ref count control Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * fix test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * the incRef in NRTReplicationEngine#commitSegmentInfos should also be managed by lock. Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * update test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * add change log Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> --------- Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
…LastIndexCommit (opensearch-project#19214) * NRTReplicationEngine#acquireLastIndexCommit add ref count control Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * fix test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * the incRef in NRTReplicationEngine#commitSegmentInfos should also be managed by lock. Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * update test Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> * add change log Signed-off-by: guojialiang <guojialiang.2012@bytedance.com> --------- Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
Description
The purpose of this PR is to address the issues #19213.
When obtaining
GatedCloseable<IndexCommit>inNRTReplicationEngine#acquireLastIndexCommit, the reference count of the files it contains is incremented by1. When performing the close operation, the reference count is decremented by1.I introduced tests which could reproduce the issue stably before this fix:
SegmentReplicationIT#testAcquireLastIndexCommitNRTReplicationEngineTests#testAcquireLastIndexCommitRelated Issues
Resolves #[19213]
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.