[Ovirt-devel] [PATCH] Fix optimistic locking during vm migration
Ian Main
imain at redhat.com
Tue Jun 8 23:16:08 UTC 2010
On Tue, 2010-06-08 at 11:31 +0200, Loiseleur Michel wrote:
> Signed-off-by: Loiseleur Michel <mloiseleur at linagora.com>
> ---
> src/db-omatic/db_omatic.rb | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb
> index da11bfa..79f29d2 100755
> --- a/src/db-omatic/db_omatic.rb
> +++ b/src/db-omatic/db_omatic.rb
> @@ -195,6 +195,9 @@ class DbOmatic < Qmf::ConsoleHandler
> end
>
> @logger.info "Updating VM #{domain['name']} to state #{state}"
> + # Optimistic locking often fails for this operation
> + # See http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html#M001320
> + vm.lock!
I haven't looked at the code this is going into yet, but don't you need
a way to retry on failure?
Ian
More information about the ovirt-devel
mailing list