Proxification of @Scheduled
tasks using @Aspect
in WebFlux seems broken after 3.2.0
#31755
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: invalid
An issue that we don't feel is valid
Description
Spring
@Scheduled
+@Aspect
proxification issue after 3.2.0 upgrade seems broken.Indeed, if you:
@Scheduled
method to add some logging and measurementsfixedDelay
@Scheduled
return aPublisher
Publisher.subscribe
tasks are no more scheduled after the single run upon restart in 3.2.0, while they still were in 3.1.5.
Environment
No specific environment variables.
Reproduce
Minimal reproducible exemple here: https://github.com/hypr2771/spring_3_2_0_proxification_scheduling_issue.
Set your parent to 3.1.5
When in 3.1.5,
@Scheduled
proxification works perfectly:Should look like:
Set your parent to 3.2.0
When in 3.2.0,
@Scheduled
proxification seems broken:Should look like:
You can note the task is being run once on boot, rescheduled but never actually subscribed it seems.
Idea
No real clue but since it keeps working if we run the
.subscribe
on the@Scheduled
process, my guess is that the underlying subscriber, related to changes made for async improvements, is disposed before it gets actually subscribed when returned by the proxified method.It might also be due to the observability added to
@Scheduled
which might be doing instrumentation or proxification of those method.The text was updated successfully, but these errors were encountered: