MCPcopy Create free account
hub / github.com/ceph/ceph / remove_by_client

Method remove_by_client

src/dmclock/src/dmclock_server.h:596–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594
595
596 void remove_by_client(const C& client,
597 bool reverse = false,
598 std::function<void (RequestRef&&)> accum = request_sink) {
599 DataGuard g(data_mtx);
600
601 auto i = client_map.find(client);
602
603 if (i == client_map.end()) return;
604
605 if (reverse) {
606 for (auto j = i->second->requests.rbegin();
607 j != i->second->requests.rend();
608 ++j) {
609 accum(std::move(j->request));
610 }
611 } else {
612 for (auto j = i->second->requests.begin();
613 j != i->second->requests.end();
614 ++j) {
615 accum(std::move(j->request));
616 }
617 }
618
619 i->second->requests.clear();
620
621 resv_heap.adjust(*i->second);
622 limit_heap.adjust(*i->second);
623 ready_heap.adjust(*i->second);
624#if USE_PROP_HEAP
625 prop_heap.adjust(*i->second);
626#endif
627 }
628
629
630 unsigned get_heap_branching_factor() const {

Callers 3

cancelMethod · 0.80
cancelMethod · 0.80
TESTFunction · 0.80

Calls 7

findMethod · 0.45
endMethod · 0.45
rbeginMethod · 0.45
rendMethod · 0.45
beginMethod · 0.45
clearMethod · 0.45
adjustMethod · 0.45

Tested by 1

TESTFunction · 0.64