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

Enhance Point In Time support with APIs to list active point-in-time searches #218

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

reta
Copy link
Collaborator

@reta reta commented Jan 11, 2024

Description

Enhance Point In Time support with APIs to list active point-in-time searches

Issues Resolved

Part of #85

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.

@reta reta requested review from dblock and dlvenable as code owners January 11, 2024 19:55
@reta reta force-pushed the list.pits branch 2 times, most recently from 79455ad to 61b6cd3 Compare January 11, 2024 20:10
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason why this file is still called Elasticsearch...?

Copy link
Collaborator Author

@reta reta Jan 17, 2024

Choose a reason for hiding this comment

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

We copied this code :-) (from Spring Data Elasticsearch)

Copy link
Member

Choose a reason for hiding this comment

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

IANAL, but it's APLv2, so you can fork/rename it as you wish, you just cannot remote the license from the file

Copy link
Collaborator Author

@reta reta Jan 18, 2024

Choose a reason for hiding this comment

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

I mean we this is way more than just one class, and we have an issue #24 to think about addressing that at large (from you :-))

Copy link
Member

Choose a reason for hiding this comment

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

I do have a memory of a 🐠

);

final long started = System.nanoTime();
while ((System.nanoTime() - started) < TimeUnit.SECONDS.toNanos(120)) {
Copy link
Member

Choose a reason for hiding this comment

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

It might be nice to bring in the Awaitility project and use that here.

This code would look something like:

await().atMost(Duration.ofSeconds(120))
  .until(() -> operations.listPointInTime().isEmpty());

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I was thinking if bringing the whole new dependency is really justified at this moment (for one single test), seems like too much.

@Override
public List<PitInfo> listPointInTime() {
return execute(client -> client.getAllPits(RequestOptions.DEFAULT))
.getPitInfos().stream().map(pit -> new PitInfo(pit.getPitId(), pit.getCreationTime(), null))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@reta reta force-pushed the list.pits branch 2 times, most recently from f9dba57 to 0e2de94 Compare June 21, 2024 19:44
…searches

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@reta reta merged commit 23b2d4f into opensearch-project:main Jun 21, 2024
12 checks passed
reta added a commit to reta/spring-data-opensearch that referenced this pull request Jun 21, 2024
…searches (opensearch-project#218)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
reta added a commit to reta/spring-data-opensearch that referenced this pull request Jun 21, 2024
…searches (opensearch-project#218)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
reta added a commit to reta/spring-data-opensearch that referenced this pull request Jun 21, 2024
…searches (opensearch-project#218)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
reta added a commit to reta/spring-data-opensearch that referenced this pull request Jun 22, 2024
…searches (opensearch-project#218)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
reta added a commit to reta/spring-data-opensearch that referenced this pull request Jun 22, 2024
…searches (opensearch-project#218)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
reta added a commit to reta/spring-data-opensearch that referenced this pull request Jun 22, 2024
…searches (opensearch-project#218)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
dblock pushed a commit that referenced this pull request Jun 24, 2024
…searches (#218) (#295)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
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.

3 participants