diff --git a/doc/xml/release.xml b/doc/xml/release.xml index aa9b8717d..07126c411 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -14,6 +14,16 @@ + + + + + + +

Fix slow manifest build for very large quantities of tables/segments.

+
+
+ diff --git a/src/storage/posix/storage.c b/src/storage/posix/storage.c index 35eadc83a..3f5209a07 100644 --- a/src/storage/posix/storage.c +++ b/src/storage/posix/storage.c @@ -223,7 +223,7 @@ storagePosixInfoList(THIS_VOID, const String *path, StorageInfoListCallback call TRY_BEGIN() { - MEM_CONTEXT_TEMP_BEGIN() + MEM_CONTEXT_TEMP_RESET_BEGIN() { // Read the directory entries struct dirent *dirEntry = readdir(dir); @@ -235,6 +235,9 @@ storagePosixInfoList(THIS_VOID, const String *path, StorageInfoListCallback call // Get next entry dirEntry = readdir(dir); + + // Reset the memory context occasionally so we don't use too much memory or slow down processing + MEM_CONTEXT_TEMP_RESET(1000); } } MEM_CONTEXT_TEMP_END();