Add retry for AccessDeniedException in AbstractFileWatchingService#128653
Merged
jfreden merged 8 commits intoelastic:mainfrom Jun 3, 2025
Merged
Add retry for AccessDeniedException in AbstractFileWatchingService#128653jfreden merged 8 commits intoelastic:mainfrom
jfreden merged 8 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Collaborator
|
Hi @jfreden, I've created a changelog YAML for you. |
Contributor
Author
|
Looks like the failing test is a known issue: #128604 |
mark-vieira
reviewed
May 30, 2025
Contributor
mark-vieira
left a comment
There was a problem hiding this comment.
Should we add a test for this similar to AbstractFileWatchingServiceTests#testRegisterWatchKeyRetry?
Contributor
Author
|
Thanks for the review @mark-vieira ! Great idea, I've added a test for that. |
joshua-adams-1
pushed a commit
to joshua-adams-1/elasticsearch
that referenced
this pull request
Jun 3, 2025
…lastic#128653) * Unmute testSymlinkUpdateTriggerReload * Add retry for AccessDeniedException in AbstractFileWatchingService * Update docs/changelog/128653.yaml
Samiul-TheSoccerFan
pushed a commit
to Samiul-TheSoccerFan/elasticsearch
that referenced
this pull request
Jun 5, 2025
…lastic#128653) * Unmute testSymlinkUpdateTriggerReload * Add retry for AccessDeniedException in AbstractFileWatchingService * Update docs/changelog/128653.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses #128619 where this appears to be happening:
settings.jsonis written toconfig/operator/..TIMESTAMP_TEMP_FOLDER_1/settings.jsonconfig/operator/..DATA -> config/operator/..TIMESTAMP_TEMP_FOLDER_1is createdconfig/operator/settings.json -> config/operator/..DATA/settings.jsonis createdsettings.jsonsettings.jsonis written toconfig/operator/..TIMESTAMP_TEMP_FOLDER_2/settings.jsonconfig/operator/..DATAis removedconfig/operator/..DATA -> config/operator/..TIMESTAMP_TEMP_FOLDER_2is createdsettings.jsonIn (6) the
..DATAsymlink could be attempted to be resolved in parallel with the removal (because the files inconfig/operatorare being reprocessed), if that happensWindowsFScould throw anAccessDeniedExceptionand therefore theAbstractFileWatchingServicethrows an exception and stops. This is roughly how things work in Kubernetes so I feel hesitant modifying the test or muting this on Windows (even though kubernetes pods running windows seem unlikely + this is currently only used internally).The proposed fix in this PR is to add retries for
AccessDeniedException.