Php 取消所有上述操作,例如“事务”;“回滚”;,但不仅仅是数据库操作

Php 取消所有上述操作,例如“事务”;“回滚”;,但不仅仅是数据库操作,php,transactions,rollback,Php,Transactions,Rollback,类似于数据库事务rollback功能,但这将适用于上述所有操作,而不仅仅是数据库。例如: first query for my database send service to first other server second query for my database send service to second other server if (some condition) { here need cancel all above operations.

类似于数据库事务
rollback
功能,但这将适用于上述所有操作,而不仅仅是数据库。例如:

 first query for my database
 send service to first other server 

 second query for my database
 send service to second other server


 if (some condition) {
     here need  cancel all above operations.
     if use database transaction `rollback` function, my database changes are canceled.
     There is possible, that cancel service sending (or may be some other, not only database) operations also? 
 }

有没有可能取消php中以前的所有操作

魔鬼就在这里的细节中。“第一台其他服务器”和“第二台其他服务器”将接受哪些操作?你控制他们吗?如果是这样,您可以应用事务启动/事务提交/回滚功能。或者简单地等待并排队等待外部调用,直到可以测试某个条件为止;从您的示例很难说这是否可行。您不能取消发送,但您听说过分布式事务吗?Mysql: