05.01.2022 15:03, Dimitry Sibiryakov wrote:
   Hello All.

  It is documented that successful return from function send() for TCP doesn't mean successful delivery of data to the target host, mere put them into socket buffer.
   If op_commit is sent but network error appear during waiting for response 
there can be two cases:
   1) op_commit packet is lost on its way to server;
   2) op_response is lost on its way to client.

   In the first case the transaction on server is rolled back in the latter - 
committed successfully.

  Is there a way to handle such situation?

  2PC protocol was developed for this kind of problems.

   Using of two round-trips cannot solve the problem, only shift point of 
uncertainty.

  2PC allows to know trasaction state and fix half-done commit.

Regards,
Vlad


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to