MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getReadyFileDescriptor

Method getReadyFileDescriptor

src/Client/HedgedConnections.cpp:445–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445int HedgedConnections::getReadyFileDescriptor(AsyncCallback async_callback)
446{
447 epoll_event event{};
448 event.data.fd = -1;
449 size_t events_count = 0;
450 bool blocking = !static_cast<bool>(async_callback);
451 while (events_count == 0)
452 {
453 events_count = epoll.getManyReady(1, &event, blocking ? -1 : 0);
454 if (!events_count && async_callback)
455 async_callback(epoll.getFileDescriptor(), 0, AsyncEventTimeoutType::NONE, epoll.getDescription(), AsyncTaskExecutor::Event::READ | AsyncTaskExecutor::Event::ERROR);
456 }
457 return event.data.fd;
458}
459
460Packet HedgedConnections::receivePacketFromReplica(const ReplicaLocation & replica_location)
461{

Callers

nothing calls this directly

Calls 3

getManyReadyMethod · 0.80
getFileDescriptorMethod · 0.45
getDescriptionMethod · 0.45

Tested by

no test coverage detected