Why does my unknown script raises the error «Asymmetric transaction rollback»?

Hello,

I am running a script in which products qty and price are updated. but after updating 500 - 600 products its giving error “Asymmetric transaction rollback”. I have total 6k products. Please let me know the issue and how to solve it.

Thanks

It is a bug of your unknown script: it tries to rollback a transaction when there is nothing to rollback.

Hello Dmitry,

Thanks for the reply. Can you please explain a little more so that I can fix it?

Just read the code of the rollBack method I have published above.
Your script calls the method when there is nothing to rollback, so it is obviously error in the script.

Dmitry,

In my script, I am just loading all enabled products and updating their qty and price

$product->setPrice($price);
$product->setQuantityAndStockStatus(array(‘is_in_stock’=>1,‘qty’=>$qty));
$product->save();

Also I have checked, the price and qty values are correct. Still not able to find the issue. Please if you help me more