aiomysql row locking when using multiple asyncio programs

199 views Asked by At

I have a mysql table on aws mysql and as such my python asyncio program which is using aiomysql - https://github.com/aio-libs/aiomysql connects to a remote mysql database.

My table shop has the following fields: id, names, product_id, payment_status

The payment_status holds the status of an order i.e paid,pending,cancelled

lets say i start my asynio program on server X and the program starts going through my table shop updating the payment_status of various products.

In another machine, i have started another asynchio program exactly like the last one at machine X in machine Y, if the program at X starts working on the rows, does aiomysql lock such a row when asyncio has yielded control for a while so as to avoid the two programs working on the same row at the same time?.

0

There are 0 answers