From 7c89846c9119efddb29e99665dc9e483f4831ef7 Mon Sep 17 00:00:00 2001 From: Pyry Hakulinen Date: Wed, 17 Oct 2012 21:28:16 +0300 Subject: [PATCH] Fix "skip_devcount" during rebalance We were updating devcount field even when skip_devcount was true. We should not use $sto here because we already have FID object and nice method available for this. Signed-off-by: Eric Wong --- lib/MogileFS/DevFID.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MogileFS/DevFID.pm b/lib/MogileFS/DevFID.pm index 92a798c..b004bb0 100644 --- a/lib/MogileFS/DevFID.pm +++ b/lib/MogileFS/DevFID.pm @@ -170,7 +170,7 @@ sub destroy { my $sto = Mgd::get_store(); $sto->remove_fidid_from_devid($self->fidid, $self->devid); - $sto->update_devcount($self->fidid); + $self->fid->update_devcount(no_lock => 1); } 1; -- 2.11.4.GIT