marsadm: fix annoying warning in corner case

This commit is contained in:
Thomas Schoebel-Theuer 2015-07-22 12:19:41 +02:00
parent cbd7cac4ad
commit 3e92223e47
1 changed files with 2 additions and 1 deletions

View File

@ -2143,7 +2143,8 @@ sub wait_umount_res {
sub invalidate_res_phase0 {
my ($cmd, $res) = @_;
check_not_primary(@_);
my $members = scalar(glob("$mars/resource-$res/data-*"));
my @member_list = glob("$mars/resource-$res/data-*");
my $members = scalar(@member_list);
if ($members > 2) {
if (!detect_splitbrain($res, 0)) {
lwarn "During split brain, $cmd is not guaranteed to work on k > 2 replicas.\n";