]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: consider epoch_sent when ignoring old peering event. 42314/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 13 Jul 2021 16:26:20 +0000 (16:26 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 13 Jul 2021 16:30:15 +0000 (16:30 +0000)
commit39f9cb8174202cc80323628f7876cf07ac9ab8e9
treed0fc3dda4385b15defdbfd3d340cb2c2cbd94ef5
parentfb242e829a21db333a3f5e43c3fab5baa54f53b1
crimson/osd: consider epoch_sent when ignoring old peering event.

The classical OSD does:

```
bool old_peering_evt(PGPeeringEventRef evt) {
  return old_peering_msg(evt->get_epoch_sent(), evt->get_epoch_requested());
}
```

```
bool PG::old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch)
{
  if (auto last_reset = get_last_peering_reset();
      last_reset > reply_epoch || last_reset > query_epoch) {
    dout(10) << "old_peering_msg reply_epoch " << reply_epoch << " query_epoch "
             << query_epoch << " last_peering_reset " << last_reset << dendl;
    return true;
  }
  return false;
}
```

See also: https://gist.github.com/rzarzynski/e60750c279ae9d234728b0b199562c40#gistcomment-3808289.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/pg.cc