Also include maxAcceptableLogicalClockDrift parameter
// In secs for hybrid LogicalClock. MONGO_EXPORT_STARTUP_SERVER_PARAMETER(maxAcceptableLogicalClockDrift, uint64_t, 365 * 24 * 60 * 60); class LogicalClock { public: ... // Assuming _myTime is mutex protected (as opposed to atomics) // Needs to be called in all cases where clock is being set, except for signAndAdvanceClusterTime Status passesRateLimiter_inlock(LogicalTime newTime) { auto now = secsNow(); if (diff(newTime.getSecs() - now) > maxAcceptableLogicalClockDrift) { return ErrorCodes::ClusterTimeFailsRateLimiter; } return Status::OK() } ... };