All of lore.kernel.org
 help / color / mirror / Atom feed
* pg_missing_t::is_missing semantics
@ 2013-05-27 15:29 Loic Dachary
  2013-05-27 19:11 ` Loic Dachary
  0 siblings, 1 reply; 3+ messages in thread
From: Loic Dachary @ 2013-05-27 15:29 UTC (permalink / raw)
  To: Ceph Development

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

Hi,

When testing if a specific version of an object is missing with pg_missing_t::is_missing
https://github.com/ceph/ceph/blob/master/src/osd/osd_types.cc#L2153
if the version needed is greater than the version given in argument, false is returned.

Each object in pg_missing_t *have* a version and *need* another and *have* is lower than *need*. 
https://github.com/ceph/ceph/blob/master/src/osd/osd_types.h#L1470

Here is what gets me confused:

  if (item.need > v)
    return false;
  return true;

A version lower than *need* is considered to not be missing ( by is_missing ) 
where a version greater than *need* is considered to be missing. 

This prototype of is_missing is used at

https://github.com/ceph/ceph/blob/master/src/osd/ReplicatedPG.cc#L5910

  if (missing.is_missing(oid, v)) {
    dout(10) << "got missing " << oid << " v " << v << dendl;
    missing.got(oid, v);
    if (is_primary())
      missing_loc.erase(oid);

If the version is greater than the one needed ( i.e. it is more recent ) then it is not considered missing and therefore not removed from missing ( which is what pg_missing_t::got does ). 

Does it mean that when an object version is in missing, it will always be removed because the PG will receive an object that is either of the same version or lower ? And never receive an object of a version greater than the one in missing ?

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] 3+ messages in thread

end of thread, other threads:[~2013-05-27 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27 15:29 pg_missing_t::is_missing semantics Loic Dachary
2013-05-27 19:11 ` Loic Dachary
2013-05-27 19:35   ` Loic Dachary

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.