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

[Remote Store] Add rest endpoint for remote store restore #3576

Merged
merged 5 commits into from
Aug 5, 2022

Conversation

sachinpkale
Copy link
Member

@sachinpkale sachinpkale commented Jun 14, 2022

Signed-off-by: Sachin Kale kalsac@amazon.com

Description

This change adds rest API endpoint to restore data from remote store. It only provides skeleton of the rest endpoint along with dummy implementation of restore logic. Actual implementation of the restore will come in the subsequent PRs.

Request

POST /_remotestore/_restore

{
    "indices": [
        "my-index-1",
        "my-index-2"
    ]
}

Issues Resolved

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

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.

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 8c199ea657c2f4df69ed339bab6e8ee39bee9e2d
Log 5960

Reports 5960

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 04b975379dc0d644f138d94f076271ce7f16afd9
Log 5961

Reports 5961

* compatible open source license.
*/

package org.opensearch.action.admin.cluster.remote_store.restore;

Choose a reason for hiding this comment

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

Will remotestore be a better naming convention for the package compared to remote_store ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, will get it changed.

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 9883317bb5fc403fddc7641aff169079805a4ff1
Log 5965

Reports 5965

@sachinpkale sachinpkale marked this pull request as draft June 14, 2022 04:55
@sachinpkale
Copy link
Member Author

Test failures. Converting to draft for now.

@sachinpkale sachinpkale marked this pull request as ready for review June 14, 2022 08:55
@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure e5f53ff8c1ba43041b4a544a57f50cf032dfd135
Log 5974

Reports 5974

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 2618e2af785085fe0b7204857b7caafa94878b21
Log 5976

Reports 5976

@sachinpkale sachinpkale marked this pull request as draft June 14, 2022 12:27
@sachinpkale
Copy link
Member Author

Moving to draft until I fix all the tests.

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure d2d815d8f7ad293e606c69acfa5cb1620f93c3ac
Log 5983

Reports 5983

@sachinpkale sachinpkale marked this pull request as ready for review June 15, 2022 02:10
@@ -885,7 +885,8 @@ public void testApiNamingConventions() throws Exception {
"nodes.hot_threads",
"nodes.usage",
"nodes.reload_secure_settings",
"search_shards", };
"search_shards",
"remote_store.restore", };
Copy link
Member Author

Choose a reason for hiding this comment

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

New API is added as high level rest client is not added for _remotestore APIs. I am not sure about guideline on writing high level rest client for new endpoints. If it is required, will add a tracking issue to add the same.

Copy link
Member

Choose a reason for hiding this comment

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

I am guessing that will be needed since it's a new API. And also https://github.com/opensearch-project/opensearch-java and https://github.com/opensearch-project/opensearch-api-specification. I'd appreciate a write up on "adding new RESTful APIs" somewhere in the developer guide, and all the subsequent changes that are required today for the next person.

Copy link
Member Author

Choose a reason for hiding this comment

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

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 9334ca368b16f44963fe5977d051c6efca15aa66
Log 6055

Reports 6055

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 4cda8e2
Log 6056

Reports 6056

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 37d07a0
Log 6057

Reports 6057

@sachinpkale
Copy link
Member Author

Following 3 tests are failing:

./gradlew ':server:internalClusterTest' --tests "org.opensearch.cluster.routing.PrimaryAllocationIT.testPrimaryReplicaResyncFailed" -Dtests.seed=B09620CBB34D45F7 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=en-PH -Dtests.timezone=W-SU -Druntime.java=17
./gradlew ':server:internalClusterTest' --tests "org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testHighWatermarkNotExceeded" -Dtests.seed=B09620CBB34D45F7 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=es-BO -Dtests.timezone=Indian/Cocos -Druntime.java=17
./gradlew ':server:internalClusterTest' --tests "org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testRestoreSnapshotAllocationDoesNotExceedWatermark" -Dtests.seed=B09620CBB34D45F7 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=es-BO -Dtests.timezone=Indian/Cocos -Druntime.java=17

I was able to run them successfully on local.

@Bukhtawar
Copy link
Collaborator

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 37d07a0
Log 6059

Reports 6059

Sachin Kale added 4 commits August 5, 2022 00:05
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
…Response

Signed-off-by: Sachin Kale <kalsac@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2022

Gradle Check (Jenkins) Run Completed with:

@Bukhtawar Bukhtawar merged commit 42058aa into opensearch-project:main Aug 5, 2022
dreamer-89 pushed a commit to dreamer-89/OpenSearch that referenced this pull request Aug 12, 2022
…-project#3576)

* Add rest endpoint for remote store restore

Signed-off-by: Sachin Kale <kalsac@amazon.com>
sachinpkale added a commit to sachinpkale/OpenSearch that referenced this pull request Sep 1, 2022
…-project#3576)

* Add rest endpoint for remote store restore

Signed-off-by: Sachin Kale <kalsac@amazon.com>
sachinpkale added a commit to sachinpkale/OpenSearch that referenced this pull request Sep 2, 2022
…-project#3576)

* Add rest endpoint for remote store restore

Signed-off-by: Sachin Kale <kalsac@amazon.com>
sachinpkale added a commit to sachinpkale/OpenSearch that referenced this pull request Sep 2, 2022
…-project#3576)

* Add rest endpoint for remote store restore

Signed-off-by: Sachin Kale <kalsac@amazon.com>
Bukhtawar pushed a commit that referenced this pull request Sep 2, 2022
…4380)

* [Remote Store] Upload segments to remote store post refresh (#3460)

* Add RemoteDirectory interface to copy segment files to/from remote store

Signed-off-by: Sachin Kale <kalsac@amazon.com>

Co-authored-by: Sachin Kale <kalsac@amazon.com>

* Add index level setting for remote store

Signed-off-by: Sachin Kale <kalsac@amazon.com>

Co-authored-by: Sachin Kale <kalsac@amazon.com>

* Add RemoteDirectoryFactory and use RemoteDirectory instance in RefreshListener

Co-authored-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Upload segment to remote store post refresh

Signed-off-by: Sachin Kale <kalsac@amazon.com>

Co-authored-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>

* [Remote Store] Inject remote store in IndexShard instead of RemoteStoreRefreshListener (#3703)

* Inject remote store in IndexShard instead of RemoteStoreRefreshListener

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Pass supplier of RepositoriesService to RemoteDirectoryFactory

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Create isRemoteStoreEnabled function for IndexShard

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Explicitly close remoteStore on indexShard close

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Change RemoteDirectory.close to a no-op

Signed-off-by: Sachin Kale <kalsac@amazon.com>

Co-authored-by: Sachin Kale <kalsac@amazon.com>

* [Remote Store] Add remote store restore API implementation (#3642)

* Add remote restore API implementation

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* [Remote Store] Add support to add nested settings for remote store (#4060)

* Add support to add nested settings for remote store

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* [Remote Store] Add rest endpoint for remote store restore (#3576)

* Add rest endpoint for remote store restore

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* [Remote Store] Add validator that forces segment replication type before enabling remote store (#4175)

* Add validator that forces segment replication type before enabling remote store

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* [Remote Store] Change remote_store setting validation message to make it more clear (#4199)

* Change remote_store setting validation message to make it more clear

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* [Remote Store] Add RemoteSegmentStoreDirectory to interact with remote segment store (#4020)

* Add RemoteSegmentStoreDirectory to interact with remote segment store

Signed-off-by: Sachin Kale <kalsac@amazon.com>

* Use RemoteSegmentStoreDirectory instead of RemoteDirectory (#4240)

* Use RemoteSegmentStoreDirectory instead of RemoteDirectory

Signed-off-by: Sachin Kale <kalsac@amazon.com>

Signed-off-by: Sachin Kale <kalsac@amazon.com>
Co-authored-by: Sachin Kale <kalsac@amazon.com>
andrross added a commit to andrross/OpenSearch that referenced this pull request Jun 12, 2023
I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: opensearch-project#1968
Upload segments to remote store post refresh: opensearch-project#3460
Add rest endpoint for remote store restore: opensearch-project#3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: opensearch-project#4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
andrross added a commit to andrross/OpenSearch that referenced this pull request Jun 12, 2023
I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: opensearch-project#1968
Upload segments to remote store post refresh: opensearch-project#3460
Add rest endpoint for remote store restore: opensearch-project#3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: opensearch-project#4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
andrross added a commit to andrross/OpenSearch that referenced this pull request Jun 12, 2023
I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: opensearch-project#1968
Upload segments to remote store post refresh: opensearch-project#3460
Add rest endpoint for remote store restore: opensearch-project#3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: opensearch-project#4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
kotwanikunal pushed a commit that referenced this pull request Jun 12, 2023
I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: #1968
Upload segments to remote store post refresh: #3460
Add rest endpoint for remote store restore: #3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: #4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
andrross added a commit to andrross/OpenSearch that referenced this pull request Jun 13, 2023
I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: opensearch-project#1968
Upload segments to remote store post refresh: opensearch-project#3460
Add rest endpoint for remote store restore: opensearch-project#3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: opensearch-project#4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
saratvemulapalli pushed a commit that referenced this pull request Jun 13, 2023
I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: #1968
Upload segments to remote store post refresh: #3460
Add rest endpoint for remote store restore: #3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: #4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
gaiksaya pushed a commit to gaiksaya/OpenSearch that referenced this pull request Jun 26, 2023
opensearch-project#8047)

I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: opensearch-project#1968
Upload segments to remote store post refresh: opensearch-project#3460
Add rest endpoint for remote store restore: opensearch-project#3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: opensearch-project#4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
imRishN pushed a commit to imRishN/OpenSearch that referenced this pull request Jun 27, 2023
I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: opensearch-project#1968
Upload segments to remote store post refresh: opensearch-project#3460
Add rest endpoint for remote store restore: opensearch-project#3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: opensearch-project#4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
I have nominated and maintainers have agreed to invite Sachin Kale
(@sachinpkale) to be a co-maintainer. Sachin has kindly accepted.

Sachin has led the design and implementation of the remote backed
storage feature in OpenSearch. This feature was introduced as
experimental in OpenSearch 2.3 and is planned for general availability
in 2.9. Some significant issues and PRs authored by Sachin for this
effort are as follows:

Feature proposal: opensearch-project#1968
Upload segments to remote store post refresh: opensearch-project#3460
Add rest endpoint for remote store restore: opensearch-project#3576
Add RemoteSegmentStoreDirectory to interact with remote segment store: opensearch-project#4020

In total, Sachin has authored 57 PRs going back to May 2022. He also
frequently reviews contributions from others and has reviewed nearly 100
PRs in the same time frame.

Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants