Skip to content

Commit 5c280d2

Browse files
committed
crimson/osd: InternalClientRequests should not be repeated after interval change
Normal cient requests are special in that we "requeue" them after an interval change if the primary did not change. This behavior exists due to a client-side optimization where the client doesn't resend the operation unless the primary changed. That's not true for InternalClientRequest (generally used for watch expirations). The primary will eventually reload and re-expire the watch once the other watchers reconnect. If we actually did want InternalClientRequests to be able to repeat after interval change, they'd need the same resettable handle mechanism normal ClientRequests use -- this implementation wouldn't actually work as it would mean the same handle reentering a previous stage. Fixes: https://tracker.ceph.com/issues/68068 Signed-off-by: Samuel Just <[email protected]>
1 parent 0d61375 commit 5c280d2

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/crimson/osd/osd_operations/internal_client_request.cc

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ seastar::future<> InternalClientRequest::start()
5454
{
5555
track_event<StartEvent>();
5656
return crimson::common::handle_system_shutdown([this] {
57-
return seastar::repeat([this] {
5857
LOG_PREFIX(InternalClientRequest::start);
5958
DEBUGI("{}: in repeat", *this);
59+
6060
return interruptor::with_interruption([this]() mutable {
6161
return enter_stage<interruptor>(
6262
client_pp().wait_for_active
@@ -121,17 +121,12 @@ seastar::future<> InternalClientRequest::start()
121121
PG::load_obc_ertr::all_same_way([] {
122122
return seastar::now();
123123
})
124-
).then_interruptible([] {
125-
return seastar::stop_iteration::yes;
126-
});
127-
}, [this](std::exception_ptr eptr) {
128-
if (should_abort_request(*this, std::move(eptr))) {
129-
return seastar::stop_iteration::yes;
130-
} else {
131-
return seastar::stop_iteration::no;
132-
}
133-
}, pg, start_epoch);
134-
}).then([this] {
124+
);
125+
}, [](std::exception_ptr eptr) {
126+
return seastar::now();
127+
}, pg, start_epoch
128+
129+
).then([this] {
135130
track_event<CompletionEvent>();
136131
}).handle_exception_type([](std::system_error &error) {
137132
logger().debug("error {}, message: {}", error.code(), error.what());

0 commit comments

Comments
 (0)