Open alkatrivedi opened 10 months ago
Code snippet(which is getting blocked while executing) multithreading.py.zip
@harshachinta Can you please triage this issue.
Issue is not reproducible with the attached snippet... @alkatrivedi also confirmed the same...
While running database queries using multiple threads, execution is getting blocked. Reason: When a transaction is initialised, in case of Bursty Session Pool a new session will get created. While creating a session spanner_api method will get called to get the object reference to the spanner api. When there will be parallel execution of the queries using multiple threads, all the threads will try to create the spanner api object at the same time which is causing thread race in our program. This is why our execution is not Thread Safe and is getting blocked.