-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[merged segment warmer] Introduce merged segment checkpoint retention to avoid listAll in computeReferencedSegmentsCheckpoint #18890
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: guojialiang <[email protected]>
Signed-off-by: guojialiang <[email protected]>
❌ Gradle check result for 0c06302: 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 <[email protected]>
❌ Gradle check result for 253c15f: 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? |
…t-merged-segment-cleanup
❌ Gradle check result for 1c90ffc: 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 <[email protected]>
❌ Gradle check result for 9ba9cb6: 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? |
❌ Gradle check result for 742b545: 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 <[email protected]>
742b545
to
762f707
Compare
Hi, @ashking94 |
…t-merged-segment-cleanup
Hi, @ashking94 I have merged the latest code from the main branch and resolved the conflicts. Looking forward to your reply:) |
❌ Gradle check result for 467872f: 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 <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #18890 +/- ##
============================================
- Coverage 72.96% 72.80% -0.17%
+ Complexity 69451 69295 -156
============================================
Files 5645 5645
Lines 318787 318821 +34
Branches 46125 46126 +1
============================================
- Hits 232610 232115 -495
- Misses 67358 67870 +512
- Partials 18819 18836 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hi, @ashking94 |
Description
This PR is based on [18720]'s follow-up work. Based on the discussion with @ashking94, I made some optimizations. The main purpose is to avoid the
listAll
operation inIndexShard#computeReferencedSegmentsCheckpoint
.The main changes in this PR are as follows:
IndexShard#primaryMergedSegmentCheckpoints
for primary shard to track merged segment checkpoints that have been published for pre-warm but not yet refreshed. We will add merged segment checkpoint toIndexShard#primaryMergedSegmentCheckpoints
beforepublish_merged_segment
.IndexShard#pendingMergedSegmentCheckpoints
toIndexShard#replicaMergedSegmentCheckpoints
, which is used for replica shard record the pre-copied merged segment checkpoints, which are not yet refreshed.ReplicationCheckpointUpdater#afterRefresh
is invoked, remove refreshed segment fromIndexShard#primaryMergedSegmentCheckpoints
. The reason why it cannot be executed inPublishCheckpointAction
can refer to the discussion in issue #18845.IndexShard#primaryMergedSegmentCheckpoints
, I introduced a configurationIndexSettings#INDEX_MERGED_SEGMENT_CHECKPOINT_RETENTION_TIME
(default15
minutes) to clean up expired checkpoints afterpublish_referenced_segments
.MergedSegmentWarmerIT#testPrimaryMergedSegmentCheckpointRetentionTimeout
. Construct a case with redundant merged segment checkpoint in the primary shard and delete it based on the expiration time.Related Issues
Resolves #[18845]
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.