Skip to content

Commit 748842a

Browse files
authored
Merge pull request ceph#59815 from athanatos/sjust/wip-68068
crimson: don't retain InternalClientRequest on interval change even if primary does not change Reviewed-by: Matan Breizman <[email protected]> Reviewed-by: Xuehan Xu <[email protected]>
2 parents e89b0ff + 8473809 commit 748842a

File tree

3 files changed

+7
-41
lines changed

3 files changed

+7
-41
lines changed

src/crimson/osd/osd_operations/client_request_common.cc

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,4 @@ CommonClientRequest::do_recover_missing(
7171
}
7272
}
7373

74-
bool CommonClientRequest::should_abort_request(
75-
const Operation& op,
76-
std::exception_ptr eptr)
77-
{
78-
if (*eptr.__cxa_exception_type() ==
79-
typeid(::crimson::common::actingset_changed)) {
80-
try {
81-
std::rethrow_exception(eptr);
82-
} catch(::crimson::common::actingset_changed& e) {
83-
if (e.is_primary()) {
84-
logger().debug("{} {} operation restart, acting set changed", __func__, op);
85-
return false;
86-
} else {
87-
logger().debug("{} {} operation abort, up primary changed", __func__, op);
88-
return true;
89-
}
90-
}
91-
} else {
92-
assert(*eptr.__cxa_exception_type() ==
93-
typeid(crimson::common::system_shutdown_exception));
94-
crimson::get_logger(ceph_subsys_osd).debug(
95-
"{} {} operation skipped, system shutdown", __func__, op);
96-
return true;
97-
}
98-
}
99-
10074
} // namespace crimson::osd

src/crimson/osd/osd_operations/client_request_common.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ struct CommonClientRequest {
1616
Ref<PG> pg,
1717
const hobject_t& soid,
1818
const osd_reqid_t& reqid);
19-
20-
static bool should_abort_request(
21-
const crimson::Operation& op, std::exception_ptr eptr);
2219
};
2320

2421
} // namespace crimson::osd

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)