MCPcopy Create free account
hub / github.com/apache/impala / DeadlineLess

Method DeadlineLess

be/src/kudu/rpc/service_queue.h:131–142  ·  view source on GitHub ↗

Comparison function which orders calls by their deadlines.

Source from the content-addressed store, hash-verified

129 private:
130 // Comparison function which orders calls by their deadlines.
131 static bool DeadlineLess(const InboundCall* a,
132 const InboundCall* b) {
133 auto time_a = a->GetClientDeadline();
134 auto time_b = b->GetClientDeadline();
135 if (time_a == time_b) {
136 // If two calls have the same deadline (most likely because neither one specified
137 // one) then we should order them by arrival order.
138 time_a = a->GetTimeReceived();
139 time_b = b->GetTimeReceived();
140 }
141 return time_a < time_b;
142 }
143
144 // Struct functor wrapper for DeadlineLess.
145 struct DeadlineLessStruct {

Callers

nothing calls this directly

Calls 2

GetClientDeadlineMethod · 0.45
GetTimeReceivedMethod · 0.45

Tested by

no test coverage detected