| 1639 | } |
| 1640 | |
| 1641 | CtPtr ProtocolV2::throttle_dispatch_queue() { |
| 1642 | ldout(cct, 20) << __func__ << dendl; |
| 1643 | |
| 1644 | const size_t cur_msg_size = get_current_msg_size(); |
| 1645 | if (cur_msg_size) { |
| 1646 | if (!connection->dispatch_queue->dispatch_throttler.get_or_fail( |
| 1647 | cur_msg_size)) { |
| 1648 | ldout(cct, 1) |
| 1649 | << __func__ << " wants " << cur_msg_size |
| 1650 | << " bytes from dispatch throttle " |
| 1651 | << connection->dispatch_queue->dispatch_throttler.get_current() << "/" |
| 1652 | << connection->dispatch_queue->dispatch_throttler.get_max() |
| 1653 | << " failed, just wait." << dendl; |
| 1654 | // following thread pool deal with th full message queue isn't a |
| 1655 | // short time, so we can wait a ms. |
| 1656 | if (connection->register_time_events.empty()) { |
| 1657 | connection->register_time_events.insert( |
| 1658 | connection->center->create_time_event(cct->_conf->ms_client_throttle_retry_time_interval, |
| 1659 | connection->wakeup_handler)); |
| 1660 | } |
| 1661 | return nullptr; |
| 1662 | } |
| 1663 | } |
| 1664 | |
| 1665 | throttle_stamp = ceph_clock_now(); |
| 1666 | state = THROTTLE_DONE; |
| 1667 | |
| 1668 | return read_frame_segment(); |
| 1669 | } |
| 1670 | |
| 1671 | CtPtr ProtocolV2::handle_keepalive2(ceph::bufferlist &payload) |
| 1672 | { |
nothing calls this directly
no test coverage detected