Skip to content

RepositoryAnalysisFailureIT: fix testFailsOnWriteException #126750

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

Merged
merged 2 commits into from
Apr 14, 2025

Conversation

bcully
Copy link
Contributor

@bcully bcully commented Apr 13, 2025

With the addition of copy coverage in the repository analyzer, blob count is no longer 1:1 with blob analyzer request count: requests that create a copy count as two blobs. This can cause testFailsOnWriteException to sometimes fail, because this test randomly injects a failure somewhere between the first and blobCounth request, which may never happen if enough of the requests create copies.

This simple fix is to inject the failure within blobCount/2 requests, which we will see even if every request generates a copy. An alternative could be to add a knob to the request to disallow copies and use that during this test.

Closes #126747

With the addition of copy coverage in the repository analyzer,
blob count is no longer 1:1 with blob analyzer request count: requests
that create a copy count as two blobs. This can cause
testFailsOnWriteException to sometimes fail, because this test randomly
injects a failure somewhere between the first and blobCounth request,
which may never happen if enough of the requests create copies.

This simple fix is to inject the failure within blobCount/2 requests,
which we will see even if every request generates a copy. An alternative
could be to add a knob to the request to disallow copies and use that
during this test.

Closes elastic#126747
@bcully bcully added >test Issues or PRs that are addressing/adding tests v9.1.0 :Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. labels Apr 13, 2025
@bcully bcully requested a review from DaveCTurner April 13, 2025 22:28
@bcully bcully self-assigned this Apr 13, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

@elasticsearchmachine elasticsearchmachine added the Team:Distributed Coordination Meta label for Distributed Coordination team label Apr 13, 2025
Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM neat

@bcully
Copy link
Contributor Author

bcully commented Apr 14, 2025

I'll wait for main to get #126779 and repush, with luck that'll clear up the bwc-snapshots failure.

@bcully bcully enabled auto-merge (squash) April 14, 2025 16:13
@bcully bcully merged commit 2a24918 into elastic:main Apr 14, 2025
17 checks passed
@bcully bcully deleted the 126747 branch April 14, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. Team:Distributed Coordination Meta label for Distributed Coordination team >test Issues or PRs that are addressing/adding tests v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] RepositoryAnalysisFailureIT testFailsOnWriteException failing
3 participants