All of lore.kernel.org
 help / color / mirror / Atom feed
* About BUG #16279
@ 2016-09-02  2:44 Ning Yao
  2016-09-02 15:50 ` Samuel Just
  0 siblings, 1 reply; 4+ messages in thread
From: Ning Yao @ 2016-09-02  2:44 UTC (permalink / raw)
  To: ceph-devel

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

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

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

* Re: About BUG #16279
  2016-09-02  2:44 About BUG #16279 Ning Yao
@ 2016-09-02 15:50 ` Samuel Just
  2016-09-06 10:35   ` Ning Yao
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Just @ 2016-09-02 15:50 UTC (permalink / raw)
  To: Ning Yao; +Cc: ceph-devel

On Thu, Sep 1, 2016 at 7:44 PM, Ning Yao <zay11022@gmail.com> 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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: About BUG #16279
  2016-09-02 15:50 ` Samuel Just
@ 2016-09-06 10:35   ` Ning Yao
  2016-09-06 14:32     ` Samuel Just
  0 siblings, 1 reply; 4+ messages in thread
From: Ning Yao @ 2016-09-06 10:35 UTC (permalink / raw)
  To: Samuel Just; +Cc: ceph-devel

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@redhat.com>:
> On Thu, Sep 1, 2016 at 7:44 PM, Ning Yao <zay11022@gmail.com> 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@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: About BUG #16279
  2016-09-06 10:35   ` Ning Yao
@ 2016-09-06 14:32     ` Samuel Just
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Just @ 2016-09-06 14:32 UTC (permalink / raw)
  To: Ning Yao; +Cc: ceph-devel

No, in that example the versions are different, 100'10 vs 122'10.
-Sam

On Tue, Sep 6, 2016 at 3:35 AM, Ning Yao <zay11022@gmail.com> wrote:
> 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@redhat.com>:
>> On Thu, Sep 1, 2016 at 7:44 PM, Ning Yao <zay11022@gmail.com> 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@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-09-06 14:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02  2:44 About BUG #16279 Ning Yao
2016-09-02 15:50 ` Samuel Just
2016-09-06 10:35   ` Ning Yao
2016-09-06 14:32     ` 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.