-
Notifications
You must be signed in to change notification settings - Fork 1.3k
The default value of refresh policy for reactive es template should be null or false #2110
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
Comments
You are right, but this is a breaking change in behaviour, so we can do this with the next major release - not speaking for Spring Boot, you'll have to raise an issue there. |
Thanks @sothawo Also before you guys make this breaking change, I'm thinking is it possible to add this "Configuration" information into the document? Because it's really hard to find it out. It won't cause any error, only big performance loss under high indexing traffic. |
I just had a deeper look into this on the Spring Data Elasticsearch side. When not using Spring Boot, but the configuration setup like it is described in https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#elasticsearch.clients.reactive, the refresh policy will be set to null because in Spring Boot creates the The Spring Data Elasticsearch documentation does not show the direct creation of a I have no problems in changing the default value to null, as this would then be the default behaviour of Elasticsearch, but this change would affect user that have the client set up by Spring Boot and not by using the Spring Data Elasticsearch configuration class. |
It cost us 1 month to troubleshoot the issue of high indexing latency(p95 10s+) during high traffic with customized routing.
Finally we find that
RefreshPolicy
is set toIMMEDIATE
by default, and latency becomes normal after we manually set it toNone
.According to the official document, the default refresh behavior should be set to
false
unless you're really care about "data consistency". And onlyReactive Template
has such default value, all others arenull
.In order to help save efforts for all users in future, I'd suggest change below two default values to
NONE
(Not sure if there's any more places):The text was updated successfully, but these errors were encountered: