Skip to content

Commit

Permalink
Merge pull request #17894 from afishbeck/prclogCliRemoteStorage
Browse files Browse the repository at this point in the history
HPCC-30481 Add logging when copying published files via remote storage

Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Oct 13, 2023
2 parents 6fc46ef + 56475e9 commit 25612cd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion common/pkgfiles/referencedfilelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,15 @@ IPropertyTree *ReferencedFile::getRemoteStorageFileTree(IUserDescriptor *user, c

Owned<wsdfs::IDFSFile> 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)
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 25612cd

Please sign in to comment.