Skip to content

The default value of refresh policy for reactive es template should be null or false #2110

Closed
@ToffeeLu

Description

@ToffeeLu

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 to IMMEDIATE by default, and latency becomes normal after we manually set it to None.

According to the official document, the default refresh behavior should be set to false unless you're really care about "data consistency". And only Reactive Template has such default value, all others are null.

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):

  1. https://github.com/spring-projects/spring-data-elasticsearch/blob/main/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java#L123
  2. https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataConfiguration.java#L111

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions