Bug #1370
closedpgmon: PGMap::creating_pgs is not checked on leader election
0%
Description
So, state is lost when the leader changes. This needs a little bit of thought to handle leaders updating their maps properly.
Updated by Sage Weil over 12 years ago
- Target version changed from v0.33 to v0.34
Updated by Sage Weil over 12 years ago
- Translation missing: en.field_position set to 31
Updated by Greg Farnum over 12 years ago
Ah, not quite what I thought it was. creating_pgs is actually maintained via stat_pg_[add|sub], and it's done correctly. The problem is that creating_pgs is only dealt with in register_new_pgs, which is only called via check_osd_map, which is only called by OSDMonitor::update_from_paxos. Which is called frequently, but backs out unless there's a new map it didn't have before.
And if your cluster is stable, you can keep the same OSD map for a looooooong time.
Which meant that if you got a new leader election at the wrong time, you could have PG creations that are indefinitely delayed. To handle this, use the virtual on_active() method and call check_osd_map (if you're the leader.
Updated by Greg Farnum over 12 years ago
- Subject changed from pgmon: PGMap::creating_pgs is not serialized to disk to pgmon: PGMap::creating_pgs is not checked on leader election
- Status changed from In Progress to 7
Updated by Greg Farnum over 12 years ago
- Status changed from 7 to Resolved
Well, I haven't seen any more errors from here, so I guess I misread something or fixed it elsewhere. Merged all the pg create bits into master in 97a77c1cbc70af7bf266afe820f2fa1627684806