So I think the notation in the code is misunderstanding? Or the code to get list<pg_log_entry_t> divergent in merge_log is wrong? // move aside divergent items list<pg_log_entry_t> divergent; while (!log.empty()) { pg_log_entry_t &oe = *log.log.rbegin(); /* * look at eversion.version here. we want to avoid a situation like: * our log: 100'10 (0'0) m 10000004d3a.00000000/head by client4225.1:18529 * new log: 122'10 (0'0) m 10000004d3a.00000000/head by client4225.1:18529 * lower_bound = 100'9 * i.e, same request, different version. If the eversion.version is > the * lower_bound, we it is divergent. */ if (oe.version.version <= lower_bound.version) break; dout(10) << "merge_log divergent " << oe << dendl; divergent.push_front(oe); log.log.pop_back(); } As the logic above, divergent will contain all log_entry whose version is the same in olog and log? Regards Ning Yao 2016-09-02 23:50 GMT+08:00 Samuel Just <sjust@xxxxxxxxxx>: > On Thu, Sep 1, 2016 at 7:44 PM, Ning Yao <zay11022@xxxxxxxxx> wrote: >> Hi, all >> >> we got the same issue http://tracker.ceph.com/issues/16279 >> >> I think it is possible objiter->second->version == last_divergent_update? >> >> If olog is [200'5 ~ 200'10, 202'11~ 202'20] with object A: [200'5, 200'8] >> log is [200'3 ~ 200'11], object A : [200'5, 200'8] >> >> Then after merge log os [200'3 ~ 200'10, 202'11~202'20] with divergent entry: >> object A: 200'5 and 200'8 > > I think I'm misunderstanding your notation, but if I'm reading this > right, the entries at 200'5 and 200'8 would *not* be divergent -- the > only divergent entry would be 200'11. > >> >> first_divergent_update will be 200'5 and last_divergent_update will be >> 200'8 for object A. If can find it in current log, and the possible >> version the object A is equal or greater than 200'8. So I am not sure >> it must be greater than last_divergent_update but may be equal? >> >> Am I missing something else? >> >> Regards >> Ning Yao >> -- >> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in >> the body of a message to majordomo@xxxxxxxxxxxxxxx >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html