| 739 | } |
| 740 | |
| 741 | CtPtr ProtocolV1::throttle_dispatch_queue() { |
| 742 | ldout(cct, 20) << __func__ << dendl; |
| 743 | |
| 744 | if (cur_msg_size) { |
| 745 | if (!connection->dispatch_queue->dispatch_throttler.get_or_fail( |
| 746 | cur_msg_size)) { |
| 747 | ldout(cct, 1) |
| 748 | << __func__ << " wants " << cur_msg_size |
| 749 | << " bytes from dispatch throttle " |
| 750 | << connection->dispatch_queue->dispatch_throttler.get_current() << "/" |
| 751 | << connection->dispatch_queue->dispatch_throttler.get_max() |
| 752 | << " failed, just wait." << dendl; |
| 753 | // following thread pool deal with th full message queue isn't a |
| 754 | // short time, so we can wait a ms. |
| 755 | if (connection->register_time_events.empty()) { |
| 756 | connection->register_time_events.insert( |
| 757 | connection->center->create_time_event(cct->_conf->ms_client_throttle_retry_time_interval, |
| 758 | connection->wakeup_handler)); |
| 759 | } |
| 760 | return nullptr; |
| 761 | } |
| 762 | } |
| 763 | |
| 764 | throttle_stamp = ceph_clock_now(); |
| 765 | |
| 766 | state = READ_MESSAGE_FRONT; |
| 767 | return read_message_front(); |
| 768 | } |
| 769 | |
| 770 | CtPtr ProtocolV1::read_message_front() { |
| 771 | ldout(cct, 20) << __func__ << dendl; |
nothing calls this directly
no test coverage detected