asyncer-io / r2dbc-mysql

Reactive Relational Database Connectivity for MySQL. The official successor to mirromutth/r2dbc-mysql(dev.miku:r2dbc-mysql).
https://r2dbc.io
Apache License 2.0
196 stars 21 forks source link

Transaction States Should Be Checked In Queue #185

Closed jchrys closed 9 months ago

jchrys commented 9 months ago

Motivation: Currently, MySqlConnection checks state between the Mono.defer is subscribed and Exchangeable is executed. It may cause undefined behavior.

Modification: Checks transaction state when request queue executes task.

Result: Resolves #183

mirromutth commented 9 months ago

Hmm, the naming of the method cancelTasks may hard to understand. Maybe we can consider changing it to recalculateTasks or recalculateOrCancelTasks

jchrys commented 9 months ago

Good idea, it makes sense to calculate statements and task bitmaps in same method.

I think it's ready to be merged for now, but maybe it could use a little more polish?

Sure, I think we could address the known issue first and then work on further polishing it. @mirromutth @JohnNiang PTAL