fix "drain" handling used by MultipleHosts replpolicy
commitf369b15978a75f26537a5a3f4df2e5575139091b
authorEric Wong <normalperson@yhbt.net>
Sat, 9 Mar 2013 07:46:23 +0000 (9 07:46 +0000)
committerEric Wong <normalperson@yhbt.net>
Sat, 9 Mar 2013 21:23:57 +0000 (9 21:23 +0000)
tree7a0e6f7c8dfe9279344212be0f03484f7340da66
parent265ccefd3b3ef6e81161c6d2fba9dfbda4782560
fix "drain" handling used by MultipleHosts replpolicy

MogileFS::DeviceState was never updated for the 2.40 drain changes.
The broken-since-2.40 should_have_files sub caused
ReplicationPolicy::MultipleHosts to overreplicate files, as it
was not counting drain devices in the total disks check.

Thanks to Tim on for reporting this to the mailing list at
mogile@googlegroups.com
lib/MogileFS/DeviceState.pm
t/multiple-hosts-replpol.t