[PATCH 3/3] monmap: clear addr_name map on calculating ranks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should clear addr_name before filling it. Otherwise, the removed
mon will stay there and cause incorrect rank assignment.

Signed-off-by: Henry C Chang <henry.cy.chang@xxxxxxxxx>
---
 src/mon/MonMap.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mon/MonMap.h b/src/mon/MonMap.h
index 651a146..ffeb572 100644
--- a/src/mon/MonMap.h
+++ b/src/mon/MonMap.h
@@ -40,6 +40,7 @@ class MonMap {
   void calc_ranks() {
     rank_name.resize(mon_addr.size());
     rank_addr.resize(mon_addr.size());
+    addr_name.clear();
     for (map<string,entity_addr_t>::iterator p = mon_addr.begin();
 	 p != mon_addr.end();
 	 p++) {
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux