Project

General

Profile

Actions

Subtask #5213

closed

Feature #4929: Erasure encoded placement group

Subtask #5046: Factor out PG logs, PG missing

unit tests for src/osd/PGLog.{cc,h}

Added by Loïc Dachary almost 11 years ago. Updated about 10 years ago.

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

100%

Spent time:
Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

work in progress

Focus on the functions related to log merging ( merge_log and proc_replica_log ) rather than the simpler functions. It may not be wise to cover 100% of the LOC because the redefinition of the API will force to rewrite the tests. When the logic is complex the tests will not need to be rewritten completely. But the accessors will change and since their semantic is trivial, the tests won't help in any way.

Pull requests Discussions
Actions #1

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
  • % Done changed from 0 to 10
Actions #2

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
Actions #3

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
Actions #4

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
Actions #5

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
Actions #6

Updated by Loïc Dachary almost 11 years ago

  • % Done changed from 10 to 30
Actions #7

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
Actions #8

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
Actions #9

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
  • % Done changed from 30 to 40
Actions #10

Updated by Loïc Dachary almost 11 years ago

related thread

<sjust> I'm not sure I understand your question
<sjust> it shouldn't happen with default settings
<loicd> that's what confused me I guess. When can it happen ? 
<sjust> but if you turn the min log entries option to a small number, the primary might wake up after a brief nap to find that all of its entries are divergent
<sjust> although now it seems like that should cause backfill
<sjust> hmm
* loicd thinking
<sjust> ah, if log.tail == auth_log.head
<loicd> but
<loicd> assert(newhead > log.tail);
<loicd> would throw then, right ? 
<sjust> yeah, you are right
<sjust> I don't think that case can happen
* loicd digging the history of changes for a hint 
<sjust> loicd: I think there may be a conflict with calc_acting where it chooses which peers can be activated, you may want to make a bug
<loicd> ok, sjust I'll check this tomorrow morning. Thanks for the advice :-)
<sjust> I think the assert is actually wrong, but we'll never see the problem case due to osd_min_pg_log_entries
<loicd> the history goes straight back to when rewind_divergent_log was not yet a function on its own, difficult to compare
<sjust> yeah, the history probably won't be a lot of help
<loicd> not sure to understand why osd_min_pg_log_entries makes it impossible for newhead to be <= log.tail 
* loicd thinking
<sjust> not impossible, but very unlikely
* loicd contemplates
<loicd>  // The logs must overlap.
<loicd>   assert(log.head >= olog.tail && olog.head >= log.tail);
<sjust> right, the question is whether the constraint is
<sjust> log.head >= olog.tail
<sjust> or
<sjust> log.head > olog.tail
<sjust> in the latter case, there may be no entries in common
<sjust> in the former case, there must be at least 1 entry in common
<loicd> so the assert can only be triggered if olog.head == log.tail because of the previous assert on  olog.head >= log.tail)

Actions #11

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
  • % Done changed from 40 to 60
Actions #12

Updated by Loïc Dachary almost 11 years ago

  • Description updated (diff)
Actions #13

Updated by Loïc Dachary almost 11 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 60 to 100
  • Translation missing: en.field_remaining_hours set to 0.00
Actions #14

Updated by Loïc Dachary over 10 years ago

  • Category changed from common to OSD
  • Estimated time set to 0:00 h
Actions

Also available in: Atom PDF