Skip to content
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

[Backport 2.x] Honor max segment size during only_expunge_deletes #10603

Merged

Conversation

msfroh
Copy link
Collaborator

@msfroh msfroh commented Oct 12, 2023

Description

Manual backport of #10036

There are latency-sensitive users for whom the default 20% allowable accumulation of deletes is too high, so they force merge with "only_expunge_deletes".

Unfortunately, this has ignored the max segment size, so despite the word "only" in there, they get the terrible side-effect of producing segments larger than the max segment size. These oversized segments are unlikely to participate in future merges, until they have so many deletes that they could drop back below the max segment size, likely making the whole "too many deletes" problem even worse.

This commit fixes that so that "only_expunge_deletes" ONLY EXPUNGES DELETES without creating oversized segments.

Related Issues

N/A

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

@msfroh msfroh changed the title Honor max segment size during only_expunge_deletes (#10036) [Backport 2.x] Honor max segment size during only_expunge_deletes Oct 12, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2023

Compatibility status:

Checks if related components are compatible with change f052d94

Incompatible components

Incompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/performance-analyzer.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/observability.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/asynchronous-search.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, https://github.com/opensearch-project/ml-commons.git]

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@msfroh msfroh force-pushed the backport/backport-10036-to-2.x branch from abb99b5 to c13ab45 Compare October 16, 2023 19:03
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@msfroh msfroh force-pushed the backport/backport-10036-to-2.x branch from c13ab45 to 85118f4 Compare October 16, 2023 22:30
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@msfroh msfroh force-pushed the backport/backport-10036-to-2.x branch from 85118f4 to d84c5c7 Compare October 18, 2023 00:39
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@msfroh
Copy link
Collaborator Author

msfroh commented Oct 19, 2023

Sigh... on the last run, Gradle Check succeeded, but GitHub didn't see it.

I'm going to retry yet again.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@msfroh msfroh force-pushed the backport/backport-10036-to-2.x branch from d84c5c7 to e0fec54 Compare October 23, 2023 17:31
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@msfroh msfroh force-pushed the backport/backport-10036-to-2.x branch from e0fec54 to f052d94 Compare October 24, 2023 16:15
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #10603 (f052d94) into 2.x (83b0371) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                2.x   #10603      +/-   ##
============================================
- Coverage     70.93%   70.92%   -0.02%     
- Complexity    58731    58739       +8     
============================================
  Files          4844     4844              
  Lines        277472   277472              
  Branches      40705    40705              
============================================
- Hits         196828   196799      -29     
- Misses        63860    63961     +101     
+ Partials      16784    16712      -72     
Files Coverage Δ
.../opensearch/index/OpenSearchTieredMergePolicy.java 100.00% <100.00%> (+3.33%) ⬆️

... and 494 files with indirect coverage changes

@msfroh msfroh merged commit 77766ce into opensearch-project:2.x Oct 24, 2023
16 checks passed
@msfroh msfroh added the v2.12.0 Issues and PRs related to version 2.12.0 label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.12.0 Issues and PRs related to version 2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants