Project

General

Profile

Actions

Bug #848

closed

limited commit_partial probably broke mds recovery

Added by Greg Farnum about 13 years ago. Updated about 13 years ago.

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

0%

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

Description

When I set up the MDS to limit the size of commits it sends to the OSDs, Sage points out that I probably broke safety since the commit machinery includes a header which contains the Dir version and the (completely up-to-date of in-memory state) parent pointer. This means that if the MDS crashed after sending one of the on-disk methods, but not all of them, then the on-disk version of the directory thinks it has more up-to-date data than it really does. Ouch!

Actions #1

Updated by Greg Farnum about 13 years ago

  • Status changed from New to 7
  • Assignee set to Greg Farnum

I haven't tested this yet, but I pushed a short fix to the mds branch which takes advantage of message ordering and I believe will fix the problem.

Actions #2

Updated by Sage Weil about 13 years ago

I'm afraid this still isn't right, because the header in the CDir object includes recursive stats that should be accurate for the items currently committed in the directory. We may need to independently track the committed vs current rstats for the dir in memory to make this work... :/

Actions #3

Updated by Greg Farnum about 13 years ago

Hmmm. I was under the impression that inconsistencies like that would be taken care of during journal replay (ie, the MDS would notice that the directory hadn't been committed and would commit the entire thing). Is that wrong, or are you worried about stats getting out of sync in the case that we lose the journal?

Actions #4

Updated by Greg Farnum about 13 years ago

Okay, after discussing this with Sage he's happy -- if we lose the journal there's not a lot we can do about partial moves splitting files across directories (regardless of how the moves are committed), and the rstats will be recalculated anyway as part of the fsck.
Meanwhile, if we don't lose the journal, all this stuff will be taken care of safely as long as the on-disk version isn't a lie. And thanks to this commit, it's not!

Pushed to master in dc8ff94ee74b909f677174116a594baa7539aefb

Actions #5

Updated by Greg Farnum about 13 years ago

  • Status changed from 7 to Resolved
Actions #6

Updated by Sage Weil about 13 years ago

  • Translation missing: en.field_story_points set to 1
  • Translation missing: en.field_position set to 1
  • Translation missing: en.field_position changed from 1 to 535
Actions #7

Updated by Sage Weil about 13 years ago

  • Translation missing: en.field_story_points changed from 1 to 2
  • Translation missing: en.field_position deleted (562)
  • Translation missing: en.field_position set to 556
Actions

Also available in: Atom PDF