All of lore.kernel.org
 help / color / mirror / Atom feed
* PGLog::merge_log clarification
@ 2013-06-04 20:18 Loic Dachary
  2013-06-04 21:22 ` Samuel Just
  0 siblings, 1 reply; 2+ messages in thread
From: Loic Dachary @ 2013-06-04 20:18 UTC (permalink / raw)
  To: Samuel Just; +Cc: Ceph Development

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

Hi Sam,

When calling merge_log on the following : http://pastealacon.com/32449 ( where the first column are the versions of the log entries and the second column are the versions of the olog entries ) I expect 5,2 and 6,1 from log to be added to divergent
https://github.com/ceph/ceph/blob/master/src/osd/PGLog.cc#L493
however, because the 1 from 6,1 compares lower than the 2 of 3,2 ( lower_bound ), the loop stops
https://github.com/ceph/ceph/blob/master/src/osd/PGLog.cc#L490
and divergent is empty. 

I am missing something and a hint would be much appreciated :-)

Cheers

-- 
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PGLog::merge_log clarification
  2013-06-04 20:18 PGLog::merge_log clarification Loic Dachary
@ 2013-06-04 21:22 ` Samuel Just
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Just @ 2013-06-04 21:22 UTC (permalink / raw)
  To: Loic Dachary; +Cc: Ceph Development

Within a single log, the version must be always increasing.  The
reason for the epoch is that you might have two logs:

   a       b
(1, 1) (1, 1)
(1, 2) (1, 2)
(1, 3)
        (2, 3)
        (2, 4)

If a dies after persisting (1, 3) but before sending it to b, b might
become primary and go on accepting writes (2, 3) and (2, 4).  Later, a
comes back and we determine that (1, 3) is divergent using the epoch
numbers.
-Sam

On Tue, Jun 4, 2013 at 1:18 PM, Loic Dachary <loic@dachary.org> wrote:
> Hi Sam,
>
> When calling merge_log on the following : http://pastealacon.com/32449 ( where the first column are the versions of the log entries and the second column are the versions of the olog entries ) I expect 5,2 and 6,1 from log to be added to divergent
> https://github.com/ceph/ceph/blob/master/src/osd/PGLog.cc#L493
> however, because the 1 from 6,1 compares lower than the 2 of 3,2 ( lower_bound ), the loop stops
> https://github.com/ceph/ceph/blob/master/src/osd/PGLog.cc#L490
> and divergent is empty.
>
> I am missing something and a hint would be much appreciated :-)
>
> Cheers
>
> --
> Loïc Dachary, Artisan Logiciel Libre
> All that is necessary for the triumph of evil is that good people do nothing.
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-04 21:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04 20:18 PGLog::merge_log clarification Loic Dachary
2013-06-04 21:22 ` Samuel Just

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.