MCPcopy Create free account
hub / github.com/apache/kvrocks / WakeupWaitConnection

Method WakeupWaitConnection

src/server/server.cc:773–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

771}
772
773void Server::WakeupWaitConnection(redis::Connection *conn, rocksdb::SequenceNumber seq) {
774 std::unique_lock<std::shared_mutex> guard(wait_contexts_mu_);
775 cleanupWaitConnection(conn);
776
777 size_t reached_replicas = GetReplicasReachedSequence(seq);
778 conn->Reply(redis::Integer(reached_replicas));
779
780 auto s = conn->Owner()->EnableWriteEvent(conn->GetFD());
781 if (!s.IsOK()) {
782 ERROR("[server] Failed to enable write event on WAIT connection {}: {}", conn->GetFD(), s.Msg());
783 }
784}
785
786void Server::CleanupWaitConnection(redis::Connection *conn) {
787 std::unique_lock<std::shared_mutex> guard(wait_contexts_mu_);

Callers 1

TimerCBMethod · 0.80

Calls 7

EnableWriteEventMethod · 0.80
OwnerMethod · 0.80
GetFDMethod · 0.80
IntegerFunction · 0.70
ReplyMethod · 0.45
IsOKMethod · 0.45
MsgMethod · 0.45

Tested by

no test coverage detected