we are using actually after update statement but it fails and it seems like both insert are an atomic operation if one fails other too.