mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 10:42:10 +02:00
Revert "BUGZ-322 - add domain checkin lag logging"
This commit is contained in:
parent
bc4a88beb7
commit
a71e902a49
8 changed files with 33 additions and 76 deletions
|
@ -358,7 +358,7 @@ SharedNodePointer DomainGatekeeper::processAssignmentConnectRequest(const NodeCo
|
||||||
nodeData->setNodeVersion(it->second.getNodeVersion());
|
nodeData->setNodeVersion(it->second.getNodeVersion());
|
||||||
nodeData->setHardwareAddress(nodeConnection.hardwareAddress);
|
nodeData->setHardwareAddress(nodeConnection.hardwareAddress);
|
||||||
nodeData->setMachineFingerprint(nodeConnection.machineFingerprint);
|
nodeData->setMachineFingerprint(nodeConnection.machineFingerprint);
|
||||||
nodeData->setLastDomainCheckinTimestamp(nodeConnection.lastPingTimestamp);
|
|
||||||
nodeData->setWasAssigned(true);
|
nodeData->setWasAssigned(true);
|
||||||
|
|
||||||
// cleanup the PendingAssignedNodeData for this assignment now that it's connecting
|
// cleanup the PendingAssignedNodeData for this assignment now that it's connecting
|
||||||
|
@ -499,9 +499,6 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
|
||||||
// set the machine fingerprint passed in the connect request
|
// set the machine fingerprint passed in the connect request
|
||||||
nodeData->setMachineFingerprint(nodeConnection.machineFingerprint);
|
nodeData->setMachineFingerprint(nodeConnection.machineFingerprint);
|
||||||
|
|
||||||
// set the last ping timestamp passed in the connect request
|
|
||||||
nodeData->setLastDomainCheckinTimestamp(nodeConnection.lastPingTimestamp);
|
|
||||||
|
|
||||||
// also add an interpolation to DomainServerNodeData so that servers can get username in stats
|
// also add an interpolation to DomainServerNodeData so that servers can get username in stats
|
||||||
nodeData->addOverrideForKey(USERNAME_UUID_REPLACEMENT_STATS_KEY,
|
nodeData->addOverrideForKey(USERNAME_UUID_REPLACEMENT_STATS_KEY,
|
||||||
uuidStringWithoutCurlyBraces(newNode->getUUID()), username);
|
uuidStringWithoutCurlyBraces(newNode->getUUID()), username);
|
||||||
|
|
|
@ -1068,8 +1068,6 @@ void DomainServer::processListRequestPacket(QSharedPointer<ReceivedMessage> mess
|
||||||
// update the connecting hostname in case it has changed
|
// update the connecting hostname in case it has changed
|
||||||
nodeData->setPlaceName(nodeRequestData.placeName);
|
nodeData->setPlaceName(nodeRequestData.placeName);
|
||||||
|
|
||||||
nodeData->setLastDomainCheckinTimestamp(nodeRequestData.lastPingTimestamp);
|
|
||||||
|
|
||||||
sendDomainListToNode(sendingNode, message->getSenderSockAddr());
|
sendDomainListToNode(sendingNode, message->getSenderSockAddr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1176,10 +1174,6 @@ void DomainServer::sendDomainListToNode(const SharedNodePointer& node, const Hif
|
||||||
|
|
||||||
DomainServerNodeData* nodeData = static_cast<DomainServerNodeData*>(node->getLinkedData());
|
DomainServerNodeData* nodeData = static_cast<DomainServerNodeData*>(node->getLinkedData());
|
||||||
|
|
||||||
domainListStream << nodeData->getLastDomainCheckinTimestamp();
|
|
||||||
|
|
||||||
domainListStream << usecTimestampNow();
|
|
||||||
|
|
||||||
// store the nodeInterestSet on this DomainServerNodeData, in case it has changed
|
// store the nodeInterestSet on this DomainServerNodeData, in case it has changed
|
||||||
auto& nodeInterestSet = nodeData->getNodeInterestSet();
|
auto& nodeInterestSet = nodeData->getNodeInterestSet();
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,6 @@ public:
|
||||||
void setMachineFingerprint(const QUuid& machineFingerprint) { _machineFingerprint = machineFingerprint; }
|
void setMachineFingerprint(const QUuid& machineFingerprint) { _machineFingerprint = machineFingerprint; }
|
||||||
const QUuid& getMachineFingerprint() { return _machineFingerprint; }
|
const QUuid& getMachineFingerprint() { return _machineFingerprint; }
|
||||||
|
|
||||||
void setLastDomainCheckinTimestamp(quint64 lastDomainCheckinTimestamp) { _lastDomainCheckinTimestamp = lastDomainCheckinTimestamp; }
|
|
||||||
quint64 getLastDomainCheckinTimestamp() { return _lastDomainCheckinTimestamp; }
|
|
||||||
|
|
||||||
void addOverrideForKey(const QString& key, const QString& value, const QString& overrideValue);
|
void addOverrideForKey(const QString& key, const QString& value, const QString& overrideValue);
|
||||||
void removeOverrideForKey(const QString& key, const QString& value);
|
void removeOverrideForKey(const QString& key, const QString& value);
|
||||||
|
|
||||||
|
@ -96,7 +93,7 @@ private:
|
||||||
QString _nodeVersion;
|
QString _nodeVersion;
|
||||||
QString _hardwareAddress;
|
QString _hardwareAddress;
|
||||||
QUuid _machineFingerprint;
|
QUuid _machineFingerprint;
|
||||||
quint64 _lastDomainCheckinTimestamp;
|
|
||||||
QString _placeName;
|
QString _placeName;
|
||||||
|
|
||||||
bool _wasAssigned { false };
|
bool _wasAssigned { false };
|
||||||
|
|
|
@ -36,8 +36,6 @@ NodeConnectionData NodeConnectionData::fromDataStream(QDataStream& dataStream, c
|
||||||
// now the machine fingerprint
|
// now the machine fingerprint
|
||||||
dataStream >> newHeader.machineFingerprint;
|
dataStream >> newHeader.machineFingerprint;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataStream >> newHeader.lastPingTimestamp;
|
|
||||||
|
|
||||||
dataStream >> newHeader.nodeType
|
dataStream >> newHeader.nodeType
|
||||||
>> newHeader.publicSockAddr >> newHeader.localSockAddr
|
>> newHeader.publicSockAddr >> newHeader.localSockAddr
|
||||||
|
|
|
@ -22,7 +22,6 @@ public:
|
||||||
bool isConnectRequest = true);
|
bool isConnectRequest = true);
|
||||||
|
|
||||||
QUuid connectUUID;
|
QUuid connectUUID;
|
||||||
quint64 lastPingTimestamp{ 0 };
|
|
||||||
NodeType_t nodeType;
|
NodeType_t nodeType;
|
||||||
HifiSockAddr publicSockAddr;
|
HifiSockAddr publicSockAddr;
|
||||||
HifiSockAddr localSockAddr;
|
HifiSockAddr localSockAddr;
|
||||||
|
|
|
@ -412,8 +412,6 @@ void NodeList::sendDomainServerCheckIn() {
|
||||||
packetStream << FingerprintUtils::getMachineFingerprint();
|
packetStream << FingerprintUtils::getMachineFingerprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
packetStream << usecTimestampNow();
|
|
||||||
|
|
||||||
// pack our data to send to the domain-server including
|
// pack our data to send to the domain-server including
|
||||||
// the hostname information (so the domain-server can see which place name we came in on)
|
// the hostname information (so the domain-server can see which place name we came in on)
|
||||||
packetStream << _ownerType.load() << publicSockAddr << localSockAddr << _nodeTypesOfInterest.toList();
|
packetStream << _ownerType.load() << publicSockAddr << localSockAddr << _nodeTypesOfInterest.toList();
|
||||||
|
@ -620,58 +618,12 @@ void NodeList::processDomainServerConnectionTokenPacket(QSharedPointer<ReceivedM
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message) {
|
void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message) {
|
||||||
|
|
||||||
// parse header information
|
|
||||||
QDataStream packetStream(message->getMessage());
|
|
||||||
|
|
||||||
// grab the domain's ID from the beginning of the packet
|
|
||||||
QUuid domainUUID;
|
|
||||||
packetStream >> domainUUID;
|
|
||||||
|
|
||||||
Node::LocalID domainLocalID;
|
|
||||||
packetStream >> domainLocalID;
|
|
||||||
|
|
||||||
// pull our owner (ie. session) UUID from the packet, it's always the first thing
|
|
||||||
// The short (16 bit) ID comes next.
|
|
||||||
QUuid newUUID;
|
|
||||||
Node::LocalID newLocalID;
|
|
||||||
packetStream >> newUUID;
|
|
||||||
packetStream >> newLocalID;
|
|
||||||
|
|
||||||
// pull the permissions/right/privileges for this node out of the stream
|
|
||||||
NodePermissions newPermissions;
|
|
||||||
packetStream >> newPermissions;
|
|
||||||
setPermissions(newPermissions);
|
|
||||||
// Is packet authentication enabled?
|
|
||||||
bool isAuthenticated;
|
|
||||||
packetStream >> isAuthenticated;
|
|
||||||
setAuthenticatePackets(isAuthenticated);
|
|
||||||
|
|
||||||
quint64 connectRequestTimestamp;
|
|
||||||
quint64 now = usecTimestampNow();
|
|
||||||
packetStream >> connectRequestTimestamp;
|
|
||||||
quint64 pingLagTime = (now - connectRequestTimestamp) / USECS_PER_MSEC;
|
|
||||||
quint64 domainServerPingReceiveTime;
|
|
||||||
|
|
||||||
packetStream >> domainServerPingReceiveTime;
|
|
||||||
quint64 domainServerRequestLag = (domainServerPingReceiveTime - connectRequestTimestamp) / USECS_PER_MSEC;
|
|
||||||
quint64 domainServerResponseLag = (now - domainServerPingReceiveTime) / USECS_PER_MSEC;
|
|
||||||
|
|
||||||
if (_domainHandler.getSockAddr().isNull()) {
|
if (_domainHandler.getSockAddr().isNull()) {
|
||||||
qWarning(networking) << "IGNORING DomainList packet while not connected to a Domain Server: sent " << pingLagTime << " msec ago.";
|
qWarning() << "IGNORING DomainList packet while not connected to a Domain Server";
|
||||||
qWarning(networking) << "DomainList request lag (with skew): " << domainServerRequestLag << "msec";
|
|
||||||
qWarning(networking) << "DomainList response lag (with skew): " << domainServerResponseLag << "msec";
|
|
||||||
// refuse to process this packet if we aren't currently connected to the DS
|
// refuse to process this packet if we aren't currently connected to the DS
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// warn if ping lag is getting long
|
|
||||||
if (pingLagTime > MSECS_PER_SECOND) {
|
|
||||||
qCDebug(networking) << "DomainList ping is lagging: " << pingLagTime << "msec";
|
|
||||||
qCDebug(networking) << "DomainList request lag (with skew): " << domainServerRequestLag << "msec";
|
|
||||||
qCDebug(networking) << "DomainList response lag (with skew): " << domainServerResponseLag << "msec";
|
|
||||||
}
|
|
||||||
|
|
||||||
// this is a packet from the domain server, reset the count of un-replied check-ins
|
// this is a packet from the domain server, reset the count of un-replied check-ins
|
||||||
_domainHandler.clearPendingCheckins();
|
_domainHandler.clearPendingCheckins();
|
||||||
|
|
||||||
|
@ -680,15 +632,28 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
|
||||||
|
|
||||||
DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::ReceiveDSList);
|
DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::ReceiveDSList);
|
||||||
|
|
||||||
|
QDataStream packetStream(message->getMessage());
|
||||||
|
|
||||||
|
// grab the domain's ID from the beginning of the packet
|
||||||
|
QUuid domainUUID;
|
||||||
|
packetStream >> domainUUID;
|
||||||
|
|
||||||
if (_domainHandler.isConnected() && _domainHandler.getUUID() != domainUUID) {
|
if (_domainHandler.isConnected() && _domainHandler.getUUID() != domainUUID) {
|
||||||
// Recieved packet from different domain.
|
// Recieved packet from different domain.
|
||||||
qWarning() << "IGNORING DomainList packet from" << domainUUID << "while connected to"
|
qWarning() << "IGNORING DomainList packet from" << domainUUID << "while connected to" << _domainHandler.getUUID();
|
||||||
<< _domainHandler.getUUID() << ": sent " << pingLagTime << " msec ago.";
|
|
||||||
qWarning(networking) << "DomainList request lag (with skew): " << domainServerRequestLag << "msec";
|
|
||||||
qWarning(networking) << "DomainList response lag (with skew): " << domainServerResponseLag << "msec";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Node::LocalID domainLocalID;
|
||||||
|
packetStream >> domainLocalID;
|
||||||
|
|
||||||
|
// pull our owner (ie. session) UUID from the packet, it's always the first thing
|
||||||
|
// The short (16 bit) ID comes next.
|
||||||
|
QUuid newUUID;
|
||||||
|
Node::LocalID newLocalID;
|
||||||
|
packetStream >> newUUID;
|
||||||
|
packetStream >> newLocalID;
|
||||||
|
|
||||||
// when connected, if the session ID or local ID were not null and changed, we should reset
|
// when connected, if the session ID or local ID were not null and changed, we should reset
|
||||||
auto currentLocalID = getSessionLocalID();
|
auto currentLocalID = getSessionLocalID();
|
||||||
auto currentSessionID = getSessionUUID();
|
auto currentSessionID = getSessionUUID();
|
||||||
|
@ -719,6 +684,15 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
|
||||||
DependencyManager::get<AddressManager>()->lookupShareableNameForDomainID(domainUUID);
|
DependencyManager::get<AddressManager>()->lookupShareableNameForDomainID(domainUUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pull the permissions/right/privileges for this node out of the stream
|
||||||
|
NodePermissions newPermissions;
|
||||||
|
packetStream >> newPermissions;
|
||||||
|
setPermissions(newPermissions);
|
||||||
|
// Is packet authentication enabled?
|
||||||
|
bool isAuthenticated;
|
||||||
|
packetStream >> isAuthenticated;
|
||||||
|
setAuthenticatePackets(isAuthenticated);
|
||||||
|
|
||||||
// pull each node in the packet
|
// pull each node in the packet
|
||||||
while (packetStream.device()->pos() < message->getSize()) {
|
while (packetStream.device()->pos() < message->getSize()) {
|
||||||
parseNodeFromPacketStream(packetStream);
|
parseNodeFromPacketStream(packetStream);
|
||||||
|
|
|
@ -27,7 +27,7 @@ PacketVersion versionForPacketType(PacketType packetType) {
|
||||||
case PacketType::StunResponse:
|
case PacketType::StunResponse:
|
||||||
return 17;
|
return 17;
|
||||||
case PacketType::DomainList:
|
case PacketType::DomainList:
|
||||||
return static_cast<PacketVersion>(DomainListVersion::HasTimestamp);
|
return static_cast<PacketVersion>(DomainListVersion::AuthenticationOptional);
|
||||||
case PacketType::EntityAdd:
|
case PacketType::EntityAdd:
|
||||||
case PacketType::EntityClone:
|
case PacketType::EntityClone:
|
||||||
case PacketType::EntityEdit:
|
case PacketType::EntityEdit:
|
||||||
|
@ -72,7 +72,7 @@ PacketVersion versionForPacketType(PacketType packetType) {
|
||||||
return static_cast<PacketVersion>(DomainConnectionDeniedVersion::IncludesExtraInfo);
|
return static_cast<PacketVersion>(DomainConnectionDeniedVersion::IncludesExtraInfo);
|
||||||
|
|
||||||
case PacketType::DomainConnectRequest:
|
case PacketType::DomainConnectRequest:
|
||||||
return static_cast<PacketVersion>(DomainConnectRequestVersion::HasTimestamp);
|
return static_cast<PacketVersion>(DomainConnectRequestVersion::AlwaysHasMachineFingerprint);
|
||||||
|
|
||||||
case PacketType::DomainServerAddedNode:
|
case PacketType::DomainServerAddedNode:
|
||||||
return static_cast<PacketVersion>(DomainServerAddedNodeVersion::PermissionsGrid);
|
return static_cast<PacketVersion>(DomainServerAddedNodeVersion::PermissionsGrid);
|
||||||
|
|
|
@ -344,8 +344,7 @@ enum class DomainConnectRequestVersion : PacketVersion {
|
||||||
HasProtocolVersions,
|
HasProtocolVersions,
|
||||||
HasMACAddress,
|
HasMACAddress,
|
||||||
HasMachineFingerprint,
|
HasMachineFingerprint,
|
||||||
AlwaysHasMachineFingerprint,
|
AlwaysHasMachineFingerprint
|
||||||
HasTimestamp
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class DomainConnectionDeniedVersion : PacketVersion {
|
enum class DomainConnectionDeniedVersion : PacketVersion {
|
||||||
|
@ -364,8 +363,7 @@ enum class DomainListVersion : PacketVersion {
|
||||||
PermissionsGrid,
|
PermissionsGrid,
|
||||||
GetUsernameFromUUIDSupport,
|
GetUsernameFromUUIDSupport,
|
||||||
GetMachineFingerprintFromUUIDSupport,
|
GetMachineFingerprintFromUUIDSupport,
|
||||||
AuthenticationOptional,
|
AuthenticationOptional
|
||||||
HasTimestamp
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class AudioVersion : PacketVersion {
|
enum class AudioVersion : PacketVersion {
|
||||||
|
|
Loading…
Reference in a new issue