-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Extract UpdateSnapshotStatusAction to its own file #132522
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
Extract UpdateSnapshotStatusAction to its own file #132522
Conversation
Pull a Transport*Action out of SnapshotsService in order to simplify and focus the SnapshotsService code. Relates ES-11650
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like SnapshotResiliencyTests
just needs the new action added to the actions
map in the TestClusterNode
constructor.
server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like SnapshotResiliencyTests just needs the new action added to the actions map in the TestClusterNode constructor.
Thanks for taking a look at the test failure, fixed in 46bb887
server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Found a stateless action caller: put up https://github.com/elastic/elasticsearch-serverless/pull/4352 to update that caller. |
actions.register(TransportDeleteSnapshotAction.TYPE, TransportDeleteSnapshotAction.class); | ||
actions.register(TransportCreateSnapshotAction.TYPE, TransportCreateSnapshotAction.class); | ||
actions.register(TransportCloneSnapshotAction.TYPE, TransportCloneSnapshotAction.class); | ||
actions.register(TransportUpdateSnapshotStatusAction.TYPE, TransportUpdateSnapshotStatusAction.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no need to register this action here since it is never invoked by Client
. We will not need modify the operator privilege Constants
if we don't register the action here.
actions.put( | ||
TransportUpdateSnapshotStatusAction.TYPE, | ||
new TransportUpdateSnapshotStatusAction(transportService, clusterService, threadPool, snapshotsService, actionFilters) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similary, there should be no need to add it to actions
. Simply instantiate it should be sufficient.
Pull a Transport*Action out of SnapshotsService
in order to simplify and focus the SnapshotsService
code.
Relates ES-11650
A step of the refactor plan described in #127419