On 1/28/22 10:08, Dumitru Ceara wrote:
> Otherwise we hide the transaction result from the user.  This may cause
> problems as the user will not detect error cases.  For example, if the
> server refuses a transaction with "constraint violation", the user
> should be notified because the transaction might need to be retried.
> 
> For clients that process database changes incrementally (using change
> tracking) this lack of failure notification creates a problem if it
> occurs while no other database changes happen.  In that case:
> - ovsdb_idl_loop_run() silently consumes the failure, initializes a
>   new transaction.
> - no other table update was received from the server so the user will
>   not add anything to the new transaction.
> - ovsdb_idl_loop_commit_and_wait() will "succeed" as nothing changed
>   from the client's perspective.
> In reality, the first transaction failed and the client wasn't given
> the chance to handle the failure.
> 
> Commit 0401cf5f9e06 ("ovsdb idl: Try committing the pending txn in
> ovsdb_idl_loop_run.") tried to optimize for the common, successful
> case.  Maintain the same approach and optimize for transactions that
> succeeded but fall back to the old mechanism of processing failures
> within ovsdb_idl_loop_commit_and_wait() instead.
> 
> Fixes: 0401cf5f9e06 ("ovsdb idl: Try committing the pending txn in 
> ovsdb_idl_loop_run.")
> Signed-off-by: Dumitru Ceara <[email protected]>
> ---
> OVN test results using this patch:
> https://github.com/dceara/ovn/actions/runs/1752945463
> ---

Thanks!  Applied and backported down to 2.14.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to