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

Improve refresh handling [DATAES-982] #1555

Closed
spring-projects-issues opened this issue Nov 22, 2020 · 0 comments
Closed

Improve refresh handling [DATAES-982] #1555

spring-projects-issues opened this issue Nov 22, 2020 · 0 comments
Labels
in: core Issues in core support type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

sothawo opened DATAES-982 and commented

Currently in non reactive code refreshes are done for repository functions, not for template operations. This leads to an extra call to ES when repository functions are used, although it may not be in the user's intent.

In the reactive code, the refresh handling can be configured in the configuration class. We should do the same in non-reactive code, this would allow us to:

  • pass the refresh parameter in the actual code
  • only do the refresh if the user wants it

We should introduce an enum that mirrors org.elasticsearch.action.support.WriteRequest.RefreshPolicy to keep ES namespace out of the API (for the reactive part as well) and provide a refresh policy for the template by means of the configuration support.

For the template, the refresh policy is passed on to Elasticsearch if it is not null, otherwise the template does nothing special so the cluster will use it's default.

For the repositories, if the refresh policy is null, then the repository will call an explicit refresh after write operations and so provide the same behaviour as up to now


Referenced from: pull request #573

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core support labels Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant