| 83 | } |
| 84 | |
| 85 | Status ReservationManager::EnableDenyReservationDebugAction() { |
| 86 | DCHECK_EQ(debug_options_.action, TDebugAction::SET_DENY_RESERVATION_PROBABILITY); |
| 87 | // Parse [0.0, 1.0] probability. |
| 88 | StringParser::ParseResult parse_result; |
| 89 | double probability = |
| 90 | StringParser::StringToFloat<double>(debug_options_.action_param.c_str(), |
| 91 | debug_options_.action_param.size(), &parse_result); |
| 92 | if (parse_result != StringParser::PARSE_SUCCESS || probability < 0.0 |
| 93 | || probability > 1.0) { |
| 94 | return Status(Substitute("Invalid SET_DENY_RESERVATION_PROBABILITY param: '$0'", |
| 95 | debug_options_.action_param)); |
| 96 | } |
| 97 | buffer_pool_client_.SetDebugDenyIncreaseReservation(probability); |
| 98 | return Status::OK(); |
| 99 | } |
| 100 | |
| 101 | } // namespace impala |
no test coverage detected