es4x icon indicating copy to clipboard operation
es4x copied to clipboard

mongo-client:Multi threaded access requested by thread Thread[] but is not allowed for language(s) js

Open darrenweb opened this issue 1 year ago • 2 comments

Hi I use vertx-mongo-client in es4x to save data. npm start and open the browser, if i just refresh the browser once (send a request), the data will be saved to mongodb normally, and there is no abnormal prompt, but if i refresh the browser quickly twice (send 2 requests ), the following error will be prompted, and the data has not been saved to mongodb. The following is the code, what do I need to do so that multiple requests can still be saved in the mongodb?

Thanks!

20230418105005

darrenweb avatar Apr 18 '23 01:04 darrenweb

This is a issue with the underlying client that isn't properly isolated. While in Java this usually isn't a problem, graal-js is very strict and will not allow it. There isn't anything we can do in es4x except hoping that the upstream client is proerly isolated.

pmlopes avatar May 10 '23 08:05 pmlopes

Is this a problem caused by the design of vertx-mongo-client.jar, and if vertx-mongo-client.jar is rewritten, can this problem be solved theoretically? Thanks!

it-solution-div3 avatar Jun 09 '23 02:06 it-solution-div3