|
@@ -1702,7 +1702,7 @@ protected:
|
|
|
|
|
|
public:
|
|
|
IMPLEMENT_IINTERFACE;
|
|
|
- CResolvedFile(const char *_lfn, const char *_physicalName, IDistributedFile *_dFile, RoxieFileType _fileType, IRoxieDaliHelper* daliHelper, bool cacheIt, bool writeAccess, bool _isSuperFile)
|
|
|
+ CResolvedFile(const char *_lfn, const char *_physicalName, IDistributedFile *_dFile, RoxieFileType _fileType, IRoxieDaliHelper* daliHelper, bool isDynamic, bool cacheIt, bool writeAccess, bool _isSuperFile)
|
|
|
: lfn(_lfn), physicalName(_physicalName), dFile(_dFile), fileType(_fileType), isSuper(_isSuperFile)
|
|
|
{
|
|
|
cached = NULL;
|
|
@@ -1730,10 +1730,13 @@ public:
|
|
|
subDFiles.append(OLINK(sub));
|
|
|
addFile(sub.queryLogicalName(), fDesc.getClear(), remoteFDesc.getClear());
|
|
|
}
|
|
|
- notifier.setown(daliHelper->getSuperFileSubscription(lfn, this));
|
|
|
// We have to clone the properties since we don't want to keep the superfile locked
|
|
|
properties.setown(createPTreeFromIPT(&dFile->queryAttributes()));
|
|
|
- dFile.clear(); // We don't lock superfiles
|
|
|
+ if (!isDynamic)
|
|
|
+ {
|
|
|
+ notifier.setown(daliHelper->getSuperFileSubscription(lfn, this));
|
|
|
+ dFile.clear(); // We don't lock superfiles, except dynamic ones
|
|
|
+ }
|
|
|
}
|
|
|
else // normal file, not superkey
|
|
|
{
|
|
@@ -2217,7 +2220,7 @@ public:
|
|
|
|
|
|
public:
|
|
|
CSlaveDynamicFile(const IRoxieContextLogger &logctx, const char *_lfn, RoxiePacketHeader *header, bool _isOpt, bool _isLocal)
|
|
|
- : CResolvedFile(_lfn, NULL, NULL, ROXIE_FILE, NULL, false, false, false), channel(header->channel), serverIdx(header->serverIdx), isOpt(_isOpt), isLocal(_isLocal)
|
|
|
+ : CResolvedFile(_lfn, NULL, NULL, ROXIE_FILE, NULL, true, false, false, false), channel(header->channel), serverIdx(header->serverIdx), isOpt(_isOpt), isLocal(_isLocal)
|
|
|
{
|
|
|
// call back to the server to get the info
|
|
|
IPendingCallback *callback = ROQ->notePendingCallback(*header, lfn); // note that we register before the send to avoid a race.
|
|
@@ -2317,13 +2320,13 @@ private:
|
|
|
|
|
|
extern IResolvedFileCreator *createResolvedFile(const char *lfn, const char *physical, bool isSuperFile)
|
|
|
{
|
|
|
- return new CResolvedFile(lfn, physical, NULL, ROXIE_FILE, NULL, false, false, isSuperFile);
|
|
|
+ return new CResolvedFile(lfn, physical, NULL, ROXIE_FILE, NULL, true, false, false, isSuperFile);
|
|
|
}
|
|
|
|
|
|
-extern IResolvedFile *createResolvedFile(const char *lfn, const char *physical, IDistributedFile *dFile, IRoxieDaliHelper *daliHelper, bool cacheIt, bool writeAccess)
|
|
|
+extern IResolvedFile *createResolvedFile(const char *lfn, const char *physical, IDistributedFile *dFile, IRoxieDaliHelper *daliHelper, bool isDynamic, bool cacheIt, bool writeAccess)
|
|
|
{
|
|
|
const char *kind = dFile ? dFile->queryAttributes().queryProp("@kind") : NULL;
|
|
|
- return new CResolvedFile(lfn, physical, dFile, kind && stricmp(kind, "key")==0 ? ROXIE_KEY : ROXIE_FILE, daliHelper, cacheIt, writeAccess, false);
|
|
|
+ return new CResolvedFile(lfn, physical, dFile, kind && stricmp(kind, "key")==0 ? ROXIE_KEY : ROXIE_FILE, daliHelper, isDynamic, cacheIt, writeAccess, false);
|
|
|
}
|
|
|
|
|
|
class CSlaveDynamicFileCache : public CInterface, implements ISlaveDynamicFileCache
|