Skip to content

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

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

Closed
greenyleaf opened this issue Apr 21, 2025 · 1 comment · Fixed by #3099
Labels
type: bug A general bug

Comments

@greenyleaf
Copy link

greenyleaf commented Apr 21, 2025

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

@greenyleaf greenyleaf changed the title The saveAll method of an reactive repository received an empty collection or empty publisher hangs forever The saveAll method of an reactive repository received a empty collection or empty publisher hangs forever Apr 21, 2025
@greenyleaf greenyleaf changed the title The saveAll method of an reactive repository received a empty collection or empty publisher hangs forever The saveAll method of a reactive repository received an empty collection or empty publisher hangs forever Apr 21, 2025
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 21, 2025
@greenyleaf greenyleaf changed the title The saveAll method of a reactive repository received an empty collection or empty publisher hangs forever [Bug] The saveAll method of a reactive repository received an empty collection or empty publisher hangs forever Apr 21, 2025
@greenyleaf greenyleaf changed the title [Bug] The saveAll method of a reactive repository received an empty collection or empty publisher hangs forever [Bug] The saveAll method of a reactive repository received an empty collection or empty publisher will hang forever Apr 22, 2025
@greenyleaf greenyleaf changed the title [Bug] The saveAll method of a reactive repository received an empty collection or empty publisher will hang forever [Bug] The saveAll method of a reactive repository received an empty collection or empty publisher hangs forever Apr 22, 2025
@sothawo sothawo changed the title [Bug] The saveAll method of a reactive repository received an empty collection or empty publisher hangs forever The saveAll method of a reactive repository received an empty collection or empty publisher hangs forever Apr 26, 2025
@sothawo sothawo added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 26, 2025
@sothawo sothawo added this to the 5.5 GA (2025.0.0) milestone Apr 26, 2025
@sothawo
Copy link
Collaborator

sothawo commented Apr 26, 2025

implemented in main and backported to branches 5.4.x and 5.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants