Mono.block() after Flux.collectList() vs List.map() after Mono.block(), memory leak occurs in the former
In the process of implementing batch jobs in Spring Batch and Spring WebFlux environments, OOM occurred. We also confirmed memory leaks through heap memory graphs, etc.
While looking for the cause of the memory leak, I removed the part that used ReactiveMongoTemplate and found that the memory leak did not occur. Accordingly, we tested a number of cases and found the following conclusions:
block() after collectList() vs List.map() after block(), memory leak occurs in the former(Reactor)
In the process of implementing batch jobs in Spring Batch and Spring WebFlux environments, OOM occurred. We also confirmed memory leaks through heap memory graphs, etc.
While looking for the cause of the memory leak, I removed the part that used ReactiveMongoTemplate and found that the memory leak did not occur. Accordingly, we tested a number of cases and found the following conclusions: