using NotifyComp = boost::asio::any_completion_handler<NotifySig>;
template<boost::asio::completion_token_for<NotifySig> CompletionToken>
auto notify(Object o, IOContext ioc, ceph::buffer::list bl,
- std::optional<std::chrono::milliseconds> timeout,
+ std::optional<std::chrono::seconds> timeout,
CompletionToken&& token) {
auto consigned = boost::asio::consign(
std::forward<CompletionToken>(token), boost::asio::make_work_guard(
SimpleOpComp);
void notify_(Object oid, IOContext ioctx,
ceph::buffer::list bl,
- std::optional<std::chrono::milliseconds> timeout,
+ std::optional<std::chrono::seconds> timeout,
NotifyComp c);
void flush_watch_(VoidOpComp);
bufferlist&& bl) {
asio::post(
strand,
- [this, ec, p = shared_from_this()]() mutable {
+ [this, ec, bl = std::move(bl), p = shared_from_this()]() mutable {
finished = true;
+ rbl = std::move(bl);
maybe_cleanup(ec);
});
}
};
void RADOS::notify_(Object o, IOContext _ioc, bufferlist bl,
- std::optional<std::chrono::milliseconds> timeout,
+ std::optional<std::chrono::seconds> timeout,
NotifyComp c)
{
auto oid = reinterpret_cast<const object_t*>(&o.impl);
});
ObjectOperation rd;
bufferlist inbl;
+ // 30s is the default in librados. Use that rather than borrowing from CephFS.
+ // TODO add a config option later.
rd.notify(
linger_op->get_cookie(), 1,
- timeout ? timeout->count() : impl->cct->_conf->client_notify_timeout,
+ timeout.value_or(30s).count(),
bl, &inbl);
impl->objecter->linger_notify(