Open dstepanov opened 1 year ago
Any news on this problem? It's making it very difficult for us to do our jobs. What are the workarounds to this problem now?
I would be enough if one could manually close the session for me right now.
I am having a non-blocking working service that uses the DB. Works like a charm.
New requirement: Same REST call for clients: In a special case I need to call another blocking HTTP service in case we don't have the information in our Database... either I get warnings that I am blocking in a reactive context or I get the infamous HR000069: Detected use of the reactive Session from a different Thread
If I could just close the session and avoid HR000069 that way and offload to Infrastructure.getDefaultWorkerPool()
that would be perfect.
Any update or workaround? I try to use Micronaut with Coroutines but this issue makes it impossible to do
Any updates on this? It cause quite big problem on using Hibernate reactive with Micronaut/Quarkus frameworks
I mean the rule here is that the reactive session is tied to a given Vert.x "duplicated" context. You can't share a reactive session between different contexts. This is exactly analogous to how you can't share a session between threads in regular Hibernate.
So you need to ensure that all accesses to a given session happen within the same Vert.x duplicated context.
Can somebody from the Hibernate team provide an example of how to schedule the operation back to the proper context?
Probably not, since we're not experts in either Vert.x or micronaut. I think you would have more luck asking the Vert.x community.
It can be raw Hibernate Reactive; I will adopt it for Micronaut Data. I just want to see if it's possible. Last time, I spent quite some time and didn't find a way to do it.
I mean if you're just talking about calling out to the database or HTTP then my understanding is that in principle Vert.x is supposed to process the response on the same duplicated context automatically. But there were cases where that wasn't working in Quarkus, which I believe they had to fix on the Quarkus side. But I don't know the details.
In Micronaut Data we have a reported issue with Hibernate Reactive and context switching. https://github.com/micronaut-projects/micronaut-data/issues/2165
There can be the following use-case:
Please help me to understand the problem.