Skip to content

The saveAll method of a reactive repository received an empty collection or empty publisher hangs forever #3093

Closed
@greenyleaf

Description

@greenyleaf

The saveAll method from an Elasticsearch reactive repository that received an empty collection or empty publisher hangs forever. That method never returns.

The same code for a reactive repository of MongoDB completed successfully.

Example code:

@Test
void saveAllEmptyTest() {
   priceItemRepository.saveAll(Collections.emptyList())
      .count()
      .doOnNext(aLong -> log.info("count: {}", aLong))
      .block();
}

and

@Test
void saveAllEmptyTest() {
   priceItemRepository.saveAll(Flux.empty())
      .count()
      .doOnNext(aLong -> log.info("count: {}", aLong))
      .block();
}

Version of spring-boot-starter-parent: 3.4.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions