Project

General

Profile

Actions

Bug #4821

closed

monitor: actually setting an exclusive in _pick_random_mon would break things

Added by Greg Farnum about 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Monitor
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

  if (other >= 0 && n >= other)
    n++;

Is that supposed to be an equality instead of a greater-than-or-equals check? I can't make sense of it as it stands.

Actions #1

Updated by Sage Weil almost 11 years ago

no i think it's right. if o is set, max is num_mon-1, and we shift o or greater one to the right to still get a uniform dist. right?

Actions #2

Updated by Greg Farnum almost 11 years ago

max is monmap->size(); there's no modification if other is specified. I guess it would work if we decremented max, and that would preserve a uniform distribution, yes.

This isn't a big hurry though as nobody uses that parameter and I believe it's correct when other is unset.

Actions #3

Updated by Sage Weil almost 11 years ago

  • Status changed from New to Resolved
  • Assignee changed from Joao Eduardo Luis to Sage Weil

oh i see, i was looking at the MonClient version (that this was probably modeled after).

741f46852380c8e75669f6d7bf1202adad0358fb

Actions

Also available in: Atom PDF