From 56475e9165f1ca05d52b983ff3f4e7ce9e7994ec Mon Sep 17 00:00:00 2001 From: Anthony Fishbeck Date: Wed, 11 Oct 2023 19:54:10 -0400 Subject: [PATCH] HPCC-30481 Add logging when copying published files via remote storage Signed-off-by: Anthony Fishbeck --- common/pkgfiles/referencedfilelist.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/common/pkgfiles/referencedfilelist.cpp b/common/pkgfiles/referencedfilelist.cpp index 6779afd0538..f7c1b0884bd 100644 --- a/common/pkgfiles/referencedfilelist.cpp +++ b/common/pkgfiles/referencedfilelist.cpp @@ -533,7 +533,15 @@ IPropertyTree *ReferencedFile::getRemoteStorageFileTree(IUserDescriptor *user, c Owned dfsFile = wsdfs::lookupDFSFile(remoteLFN.str(), AccessMode::readSequential, INFINITE, wsdfs::keepAliveExpiryFrequency, user); IPropertyTree *tree = (dfsFile) ? dfsFile->queryFileMeta() : nullptr; - return tree ? tree->getPropTree("File") : nullptr; + if (!tree) + { + DBGLOG("RemoteStorage FileMetaTree not found %s [remoteStorage=%s, prefix=%s]", remoteLFN.str(), nullText(remoteStorageName), nullText(remotePrefix)); + return nullptr; + } + tree = tree->getPropTree("File"); + if (!tree) + DBGLOG("RemoteStorage FileTree not found %s [remoteStorage=%s, prefix=%s]", remoteLFN.str(), nullText(remoteStorageName), nullText(remotePrefix)); + return tree; } void ReferencedFile::resolveRemote(IUserDescriptor *user, const char *remoteStorageName, const char *remotePrefix, const StringArray &locations, const char *srcCluster, bool checkLocalFirst, StringArray *subfiles, bool resolveLFNForeign) @@ -1061,6 +1069,7 @@ void ReferencedFileList::resolveFiles(const StringArray &locations, const char * if (useRemoteStorage) { + DBGLOG("ReferencedFileList resolving remote storage files at %s", nullText(remoteLocation)); if (!user) user.setown(createUserDescriptor()); remoteStorage.set(remoteLocation); @@ -1070,6 +1079,10 @@ void ReferencedFileList::resolveFiles(const StringArray &locations, const char * } else { + if (!isEmptyString(remoteLocation)) + DBGLOG("ReferencedFileList resolving remote dali files at %s", remoteLocation); + else + DBGLOG("ReferencedFileList resolving local files (no daliip)"); remote.setown(!isEmptyString(remoteLocation) ? createINode(remoteLocation, 7070) : nullptr); ReferencedFileIterator files(this);