]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd: keep ClientRequest alive during `seastar::repeat()`
authorKefu Chai <kchai@redhat.com>
Sun, 28 Feb 2021 05:23:29 +0000 (13:23 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 28 Feb 2021 06:06:05 +0000 (14:06 +0800)
commit17fc145f90c048bec4ddae35c7aa559cdd77115e
tree51f9d53b6064f40ed413bacdd4f26a9973155a59
parent776a3ab14a0a933dfee25b89dc308ff283b8a9ac
crimson/osd: keep ClientRequest alive during `seastar::repeat()`

before this change, `this` is wrapped by a smart pointer which is
in turn captured by multiple continuations. the continuation with the
longest life cycle is the one passed to `seastar::repeat()`. where
the underlying `repeater` captures the continuation as its member variable.
and `repeater` is not destroyed before `seastar::repeat()` returns.

so, we only need to capture `opref` in the continuation passed to
`seastar::repeat()`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd_operations/client_request.cc