Skip to content

Commit

Permalink
HPCC-30570 Revise based on review
Browse files Browse the repository at this point in the history
Signed-off-by: wangkx <[email protected]>
  • Loading branch information
wangkx committed Dec 5, 2023
1 parent 4d16d77 commit 5787da2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
12 changes: 10 additions & 2 deletions esp/services/ws_fs/ws_fsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2695,11 +2695,19 @@ bool CFileSprayEx::onCopy(IEspContext &context, IEspCopy &req, IEspCopyResponse
const char* destNodeGroupReq = req.getDestGroup();
if(isEmptyString(destNodeGroupReq))
{
if(isContainerized() && !isEmptyString(srcDali))
CDfsLogicalFileName lfn;
lfn.set(srcname);
if(!isEmptyString(srcDali) || lfn.isForeign() || lfn.isRemote())
{
//makes no sense to get the srcname's current group, if a logical file is from a different environment.
getDefaultStoragePlane(destNodeGroup);
DBGLOG("Destination node group not specified, using default node group %s", destNodeGroup.str());
}
else
{
getNodeGroupFromLFN(context, srcname, destNodeGroup);
DBGLOG("Destination node group not specified, using source node group %s", destNodeGroup.str());
DBGLOG("Destination node group not specified, using source node group %s", destNodeGroup.str());
}
}
else
{
Expand Down
4 changes: 3 additions & 1 deletion esp/smc/SMCLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ include_directories (
./../../bindings/SOAP/xpp
./..
${HPCC_SOURCE_DIR}/common/thorhelper
${HPCC_SOURCE_DIR}/esp/clients/ws_dfsclient
)

ADD_DEFINITIONS( -D_USRDLL -DSMCLIB_EXPORTS -DWSWU_API_LOCAL -DWsResources_API_LOCAL )
Expand All @@ -84,7 +85,8 @@ target_link_libraries ( SMCLib
nbcd
eclrtl
deftype
workunit
workunit
ws_dfsclient
)

if (NOT CONTAINERIZED)
Expand Down
3 changes: 2 additions & 1 deletion esp/smc/SMCLib/LogicFileWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "LogicFileWrapper.hpp"
#include "dautils.hpp"
#include "exception_util.hpp"
#include "ws_dfsclient.hpp"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
Expand Down Expand Up @@ -107,7 +108,7 @@ IDistributedFile* lookupLogicalName(IEspContext& context, const char* logicalNam
userDesc->set(userID, context.queryPassword(), context.querySignature());
}

Owned<IDistributedFile> df = queryDistributedFileDirectory().lookup(logicalName, userDesc, accessMode,
Owned<IDistributedFile> df = wsdfs::lookup(logicalName, userDesc, accessMode,
hold, lockSuperOwner, transaction, privilegedUser, timeout);
return df.getClear();
}
Expand Down

0 comments on commit 5787da2

Please sign in to comment.