Skip to content

Move blocking view resolution to boundedElastic#30903

Closed
Arooba-git wants to merge 2 commits into
spring-projects:mainfrom
Arooba-git:fix-blocking-call
Closed

Move blocking view resolution to boundedElastic#30903
Arooba-git wants to merge 2 commits into
spring-projects:mainfrom
Arooba-git:fix-blocking-call

Conversation

@Arooba-git

Copy link
Copy Markdown

Hi! :)

We used BlockHound to identify blocking operations in reactive spring modules; it turns out resolveViewName operation is blocking the reactive pipeline in webflux:

Screen Shot 2023-07-17 at 7 53 44 PM This PR fixes the blocking call as well as updates a test to support the updated, reactive version.

The changes have been validated with build and test commands as mention in guidelines. 👍

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 17, 2023
@jhoeller jhoeller changed the title Fix blocking call Move blocking view resolution to boundedElastic Aug 3, 2023
@jhoeller jhoeller added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 3, 2023
@jhoeller jhoeller added this to the 6.0.12 milestone Aug 3, 2023
@poutsma poutsma self-assigned this Aug 16, 2023
@poutsma poutsma modified the milestones: 6.0.12, 6.1.0-RC1 Aug 17, 2023
@poutsma

poutsma commented Aug 17, 2023

Copy link
Copy Markdown
Contributor

The problem with the changes made by this PR is that all view resolution is done one the bounded elastic scheduler; not just blocking ones like FreeMarker. And because context switches can be expensive, it is not desirable for this to happen.

I will address the concern underlying this PR (i.e. blocking template resolution when using FreeMarker) by localizing the usage of the bounded elastic scheduler to just the blocking operations in FreeMarkerView, and not all view resolutions. Doing so will require introducing new methods, so I am rescheduling to 6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants