From d7c603e2013ef7af97ce090866db72c88164b0ba Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Thu, 30 Nov 2023 13:09:53 +0000 Subject: [PATCH] HPCC-30948 Ensure dafilesrv starts if config is missing Signed-off-by: Jake Smith --- fs/dafilesrv/dafilesrv.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/dafilesrv/dafilesrv.cpp b/fs/dafilesrv/dafilesrv.cpp index efbf863e5a6..5aa551bf8fe 100644 --- a/fs/dafilesrv/dafilesrv.cpp +++ b/fs/dafilesrv/dafilesrv.cpp @@ -656,8 +656,13 @@ int main(int argc, const char* argv[]) throttleSlowQueueLimit = throttleQueueLimit; #endif + Owned dummyDafileSrvInstance; if (nullptr == dafileSrvInstance) - throw makeStringException(-1, "dafilesrv: configuration section missing"); + { + PROGLOG("WARNING: no dafilesrv configuration, default settings will be used"); + dummyDafileSrvInstance.setown(createPTree()); + dafileSrvInstance = dummyDafileSrvInstance; + } maxThreads = dafileSrvInstance->getPropInt("@maxThreads", maxThreads); maxThreadsDelayMs = dafileSrvInstance->getPropInt("@maxThreadsDelayMs", maxThreadsDelayMs); maxAsyncCopy = dafileSrvInstance->getPropInt("@maxAsyncCopy", maxAsyncCopy);