| 276 | std::shared_ptr<const std::array<AddrsInfo, LogsDB::REPLICA_COUNT>> _replicas; |
| 277 | public: |
| 278 | CDCServer(Logger& logger, std::shared_ptr<XmonAgent>& xmon, CDCOptions& options, CDCShared& shared) : |
| 279 | Loop(logger, xmon, "req_server"), |
| 280 | _shared(shared), |
| 281 | _basePath(options.logsDBOptions.dbDir), |
| 282 | _seenShards(false), |
| 283 | _currentLogIndex(_shared.db.lastAppliedLogEntry()), |
| 284 | // important to not catch stray requests from previous executions |
| 285 | _shardRequestIdCounter(RandomGenerator().generate64()), |
| 286 | _shardTimeout(options.shardTimeout), |
| 287 | _receiver({.perSockMaxRecvMsg = MAX_MSG_RECEIVE, .maxMsgSize = MAX_UDP_MTU}), |
| 288 | _cdcSender({.maxMsgSize = MAX_UDP_MTU}), |
| 289 | _logsDB(shared.logsDB) |
| 290 | { |
| 291 | expandKey(CDCKey, _expandedCDCKey); |
| 292 | _shared.isLeader.store(_logsDB.isLeader(), std::memory_order_relaxed); |
| 293 | _logsDBLogIndex = _logsDB.getLastReleased(); |
| 294 | LOG_INFO(_env, "Waiting for shard info to be filled in"); |
| 295 | } |
| 296 | |
| 297 | virtual void step() override { |
| 298 | std::vector<LogsDBLogEntry> entries; |
nothing calls this directly
no test coverage detected