Commit be024bfb authored by TousakaRin's avatar TousakaRin

change flag name from Controller::FLAGS_ADDED_CONCURRENCY to FLAGS_CONCURRENCY_LIMITER_REQUESTED

parent c10ea28e
......@@ -115,8 +115,8 @@ friend void policy::ProcessThriftRequest(InputMessageBase*);
// << Flags >>
static const uint32_t FLAGS_IGNORE_EOVERCROWDED = 1;
static const uint32_t FLAGS_SECURITY_MODE = (1 << 1);
// Incremented Server._concurrency
static const uint32_t FLAGS_ADDED_CONCURRENCY = (1 << 2);
// Called Server._cl->OnRequested()
static const uint32_t FLAGS_CONCURRENCY_LIMITER_REQUESTED = (1 << 2);
static const uint32_t FLAGS_READ_PROGRESSIVELY = (1 << 3);
static const uint32_t FLAGS_PROGRESSIVE_READER = (1 << 4);
static const uint32_t FLAGS_BACKUP_REQUEST = (1 << 5);
......
......@@ -41,14 +41,14 @@ public:
// Returns true if the `max_concurrency' limit is not reached.
bool AddConcurrency(Controller* c) {
if (NULL != _server->_cl) {
c->add_flag(Controller::FLAGS_ADDED_CONCURRENCY);
c->add_flag(Controller::FLAGS_CONCURRENCY_LIMITER_REQUESTED);
return _server->_cl->OnRequested();
}
return true;
}
void RemoveConcurrency(const Controller* c) {
if (c->has_flag(Controller::FLAGS_ADDED_CONCURRENCY)){
if (c->has_flag(Controller::FLAGS_CONCURRENCY_LIMITER_REQUESTED)){
CHECK(_server->_cl != NULL);
_server->_cl->OnResponded(c->ErrorCode(), c->latency_us());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment