PGLog::merge_log clarification
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
Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
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
Quoted 8 lines · Loic Dachary
Hi Sam,
When calling
merge_logon 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.
Quoted 10 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html