Merge "Avoid calling rollback() in handleWriteError() if there is no trx"