mirror of
https://github.com/ceph/ceph
synced 2025-03-20 09:16:59 +00:00
Merge pull request #7148 from athanatos/wip-14248
OpRequest: release the message throttle when unregistered Reviewed-by: Greg Farnum <gfarnum@redhat.com>
This commit is contained in:
commit
95d2666be3
@ -294,8 +294,7 @@ protected:
|
||||
virtual ~Message() {
|
||||
if (byte_throttler)
|
||||
byte_throttler->put(payload.length() + middle.length() + data.length());
|
||||
if (msg_throttler)
|
||||
msg_throttler->put();
|
||||
release_message_throttle();
|
||||
/* call completion hooks (if any) */
|
||||
if (completion_hook)
|
||||
completion_hook->complete(0);
|
||||
@ -347,6 +346,11 @@ public:
|
||||
data.clear();
|
||||
clear_buffers(); // let subclass drop buffers as well
|
||||
}
|
||||
void release_message_throttle() {
|
||||
if (msg_throttler)
|
||||
msg_throttler->put();
|
||||
msg_throttler = nullptr;
|
||||
}
|
||||
|
||||
bool empty_payload() const { return payload.length() == 0; }
|
||||
bufferlist& get_payload() { return payload; }
|
||||
|
@ -81,6 +81,7 @@ void OpRequest::_dump_op_descriptor_unlocked(ostream& stream) const
|
||||
void OpRequest::_unregistered() {
|
||||
request->clear_data();
|
||||
request->clear_payload();
|
||||
request->release_message_throttle();
|
||||
}
|
||||
|
||||
bool OpRequest::check_rmw(int flag) {
|
||||
|
Loading…
Reference in New Issue
Block a user