-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix Segment Replication stats bytes behind metric #9686
Conversation
This metric currently gives an estimate of the bytes behind based on the difference in size of the segments referenced by the active readers between shards. This does not give a good indication of the amount of bytes that need to be fetched and is inaccurate after deletes and merges. Fixed by sending file metadata with each checkpoint and computing a diff between checkpoints when SegmentReplicationShardStats is built. Signed-off-by: Marc Handalian <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:Checks if related components are compatible with change b3e779a 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:
|
Segrep specific bwc test fails here bc of wire compatibility. Will mute this until this is backported. |
Signed-off-by: Marc Handalian <[email protected]>
Signed-off-by: Marc Handalian <[email protected]>
Compatibility status:Checks if related components are compatible with change b0e3cfc Incompatible componentsSkipped 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/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git] |
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #9686 +/- ##
============================================
- Coverage 71.15% 71.08% -0.07%
+ Complexity 57727 57692 -35
============================================
Files 4800 4800
Lines 272047 272064 +17
Branches 39703 39705 +2
============================================
- Hits 193565 193404 -161
- Misses 62266 62418 +152
- Partials 16216 16242 +26
|
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:Checks if related components are compatible with change f6dee2b Incompatible componentsSkipped 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/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/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:
|
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-9686-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f9b6694c0eb4a4a7be326ba143edc41a6eba2f0c
# Push it to GitHub
git push --set-upstream origin backport/backport-9686-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
* Fix Segment Replication stats bytes behind metric. This metric currently gives an estimate of the bytes behind based on the difference in size of the segments referenced by the active readers between shards. This does not give a good indication of the amount of bytes that need to be fetched and is inaccurate after deletes and merges. Fixed by sending file metadata with each checkpoint and computing a diff between checkpoints when SegmentReplicationShardStats is built. Signed-off-by: Marc Handalian <[email protected]> * Skip SegRep bwc test until this is backported to 2.x. Signed-off-by: Marc Handalian <[email protected]> * Add changelog entry. Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]> (cherry picked from commit f9b6694) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-9686-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f9b6694c0eb4a4a7be326ba143edc41a6eba2f0c
# Push it to GitHub
git push --set-upstream origin backport/backport-9686-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
…#9686) * Fix Segment Replication stats bytes behind metric. This metric currently gives an estimate of the bytes behind based on the difference in size of the segments referenced by the active readers between shards. This does not give a good indication of the amount of bytes that need to be fetched and is inaccurate after deletes and merges. Fixed by sending file metadata with each checkpoint and computing a diff between checkpoints when SegmentReplicationShardStats is built. Signed-off-by: Marc Handalian <[email protected]> * Skip SegRep bwc test until this is backported to 2.x. Signed-off-by: Marc Handalian <[email protected]> * Add changelog entry. Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: Kaushal Kumar <[email protected]>
…#9686) * Fix Segment Replication stats bytes behind metric. This metric currently gives an estimate of the bytes behind based on the difference in size of the segments referenced by the active readers between shards. This does not give a good indication of the amount of bytes that need to be fetched and is inaccurate after deletes and merges. Fixed by sending file metadata with each checkpoint and computing a diff between checkpoints when SegmentReplicationShardStats is built. Signed-off-by: Marc Handalian <[email protected]> * Skip SegRep bwc test until this is backported to 2.x. Signed-off-by: Marc Handalian <[email protected]> * Add changelog entry. Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: Ivan Brusic <[email protected]>
…#9686) * Fix Segment Replication stats bytes behind metric. This metric currently gives an estimate of the bytes behind based on the difference in size of the segments referenced by the active readers between shards. This does not give a good indication of the amount of bytes that need to be fetched and is inaccurate after deletes and merges. Fixed by sending file metadata with each checkpoint and computing a diff between checkpoints when SegmentReplicationShardStats is built. Signed-off-by: Marc Handalian <[email protected]> * Skip SegRep bwc test until this is backported to 2.x. Signed-off-by: Marc Handalian <[email protected]> * Add changelog entry. Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Fix SegRep's bytesbehind metric to be accurate by computing a diff of segments referenced by each ReplicationCheckpoint.
This change adds a map of StoreFileMetadata to ReplicationCheckpoint, which is computed from the SegmentInfos used to build the checkpoint.
Related Issues
Resolves #9685
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.