From caf1d492b19f6364776b9113e665eb38a2b45d2c Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 5 Nov 2024 17:38:04 +0100 Subject: [PATCH] provide proper log when we block a self hydration request should make the existing log more useful when tracking the self requested implicit hydration bugs Signed-off-by: Matthieu Gallien --- src/libsync/vfs/cfapi/cfapiwrapper.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libsync/vfs/cfapi/cfapiwrapper.cpp b/src/libsync/vfs/cfapi/cfapiwrapper.cpp index a483d2c06..abe72f191 100644 --- a/src/libsync/vfs/cfapi/cfapiwrapper.cpp +++ b/src/libsync/vfs/cfapi/cfapiwrapper.cpp @@ -157,17 +157,17 @@ void CALLBACK cfApiFetchDataCallback(const CF_CALLBACK_INFO *callbackInfo, const callbackInfo->FileSize.QuadPart); }; - if (QCoreApplication::applicationPid() == callbackInfo->ProcessInfo->ProcessId) { - qCCritical(lcCfApiWrapper) << "implicit hydration triggered by the client itself. Will lead to a deadlock. Cancel"; - sendTransferError(); - return; - } - auto vfs = reinterpret_cast(callbackInfo->CallbackContext); Q_ASSERT(vfs->metaObject()->className() == QByteArrayLiteral("OCC::VfsCfApi")); const auto path = QString(QString::fromWCharArray(callbackInfo->VolumeDosName) + QString::fromWCharArray(callbackInfo->NormalizedPath)); const auto requestId = QString::number(callbackInfo->TransferKey.QuadPart, 16); + if (QCoreApplication::applicationPid() == callbackInfo->ProcessInfo->ProcessId) { + qCCritical(lcCfApiWrapper) << "implicit hydration triggered by the client itself. Will lead to a deadlock. Cancel" << path << requestId; + sendTransferError(); + return; + } + qCDebug(lcCfApiWrapper) << "Request hydration for" << path << requestId; const auto invokeResult = QMetaObject::invokeMethod(vfs, [=] { vfs->requestHydration(requestId, path); }, Qt::QueuedConnection); -- 2.30.2