diff options
4 files changed, 42 insertions, 74 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Do-not-use-MINSIGSTKSZ.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Do-not-use-MINSIGSTKSZ.patch deleted file mode 100644 index 0ee64e9c6c..0000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Do-not-use-MINSIGSTKSZ.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From 027044a692b588ef586d495f65eb58b07cc711a3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 11 May 2021 10:15:51 -0700 | ||
| 4 | Subject: [PATCH] Do not use MINSIGSTKSZ | ||
| 5 | |||
| 6 | Since glibc 2.34+ MINSIGSTKSZ is no more a constant. So, | ||
| 7 | let's hardwire this for now until better fix is found. | ||
| 8 | 64Kb should be good anyway | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | src/mongo/stdx/thread.h | 5 +---- | ||
| 14 | 1 file changed, 1 insertion(+), 4 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/src/mongo/stdx/thread.h b/src/mongo/stdx/thread.h | ||
| 17 | index f8058279e3..f31f309959 100644 | ||
| 18 | --- a/src/mongo/stdx/thread.h | ||
| 19 | +++ b/src/mongo/stdx/thread.h | ||
| 20 | @@ -104,10 +104,7 @@ private: | ||
| 21 | // . N Y : 4,344 | 13,048 | 7,352 | ||
| 22 | // . Y Y : 4,424 | 13,672 | 8,392 | ||
| 23 | // ( https://jira.mongodb.org/secure/attachment/233569/233569_stacktrace-writeup.txt ) | ||
| 24 | - static constexpr std::size_t kMongoMinSignalStackSize = std::size_t{64} << 10; | ||
| 25 | - | ||
| 26 | - static constexpr std::size_t kStackSize = | ||
| 27 | - std::max(kMongoMinSignalStackSize, std::size_t{MINSIGSTKSZ}); | ||
| 28 | + static constexpr std::size_t kStackSize = std::size_t{64} << 10; | ||
| 29 | std::unique_ptr<std::byte[]> _stackStorage = std::make_unique<std::byte[]>(kStackSize); | ||
| 30 | |||
| 31 | #else // !MONGO_HAS_SIGALTSTACK | ||
| 32 | -- | ||
| 33 | 2.31.1 | ||
| 34 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-explicit-typecast-to-size_t.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-explicit-typecast-to-size_t.patch deleted file mode 100644 index 5b724ff8aa..0000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-explicit-typecast-to-size_t.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | From 6fdb2d304e05a17e57b2efd7f8252794a8722dbe Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 1 Jun 2021 08:25:36 -0700 | ||
| 4 | Subject: [PATCH] Use explicit typecast to size_t | ||
| 5 | |||
| 6 | maxMemoryUsageBytes is size_t type which may not match long long value | ||
| 7 | internalDocumentSourceGroupMaxMemoryBytes.load() returns, so typecast it | ||
| 8 | to avoid narrowing warning from clang | ||
| 9 | |||
| 10 | document_source_group.cpp:378:22: error: non-constant-expression cannot be narrowed from type 'long long' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] | ||
| 11 | maxMemoryUsageBytes ? *maxMemoryUsageBytes | ||
| 12 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 13 | |||
| 14 | Upstream-Status: Submitted [https://github.com/mongodb/mongo/pull/1405] | ||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | src/mongo/db/pipeline/document_source_group.cpp | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/src/mongo/db/pipeline/document_source_group.cpp b/src/mongo/db/pipeline/document_source_group.cpp | ||
| 21 | index c7bf44e72e..a52906a940 100644 | ||
| 22 | --- a/src/mongo/db/pipeline/document_source_group.cpp | ||
| 23 | +++ b/src/mongo/db/pipeline/document_source_group.cpp | ||
| 24 | @@ -376,7 +376,7 @@ DocumentSourceGroup::DocumentSourceGroup(const intrusive_ptr<ExpressionContext>& | ||
| 25 | _doingMerge(false), | ||
| 26 | _memoryTracker{pExpCtx->allowDiskUse && !pExpCtx->inMongos, | ||
| 27 | maxMemoryUsageBytes ? *maxMemoryUsageBytes | ||
| 28 | - : internalDocumentSourceGroupMaxMemoryBytes.load()}, | ||
| 29 | + : (size_t)internalDocumentSourceGroupMaxMemoryBytes.load()}, | ||
| 30 | _initialized(false), | ||
| 31 | _groups(pExpCtx->getValueComparator().makeUnorderedValueMap<Accumulators>()), | ||
| 32 | _spilled(false) { | ||
| 33 | -- | ||
| 34 | 2.31.1 | ||
| 35 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch new file mode 100644 index 0000000000..de05624429 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From ad37ee80b32a1f740a3197105174d74dff11e4e8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 13 Apr 2022 13:56:32 -0700 | ||
| 4 | Subject: [PATCH] add explict static_cast<size_t> to maxMemoryUsageBytes | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | src/mongo/db/pipeline/document_source_group.cpp:377:22: error: non-constant-expression cannot be narrowed from type 'long long' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] | ||
| 8 | maxMemoryUsageBytes ? *maxMemoryUsageBytes | ||
| 9 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 10 | src/mongo/db/pipeline/document_source_group.cpp:377:22: note: insert an explicit cast to silence this issue | ||
| 11 | maxMemoryUsageBytes ? *maxMemoryUsageBytes | ||
| 12 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 13 | |||
| 14 | Upstream-Status: Pending | ||
| 15 | |||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | src/mongo/db/pipeline/document_source_group.cpp | 4 ++-- | ||
| 19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/src/mongo/db/pipeline/document_source_group.cpp b/src/mongo/db/pipeline/document_source_group.cpp | ||
| 22 | index 4a7b48d6cd2..9a6076c6041 100644 | ||
| 23 | --- a/src/mongo/db/pipeline/document_source_group.cpp | ||
| 24 | +++ b/src/mongo/db/pipeline/document_source_group.cpp | ||
| 25 | @@ -374,8 +374,8 @@ DocumentSourceGroup::DocumentSourceGroup(const intrusive_ptr<ExpressionContext>& | ||
| 26 | _usedDisk(false), | ||
| 27 | _doingMerge(false), | ||
| 28 | _memoryTracker{pExpCtx->allowDiskUse && !pExpCtx->inMongos, | ||
| 29 | - maxMemoryUsageBytes ? *maxMemoryUsageBytes | ||
| 30 | - : internalDocumentSourceGroupMaxMemoryBytes.load()}, | ||
| 31 | + static_cast<size_t>(maxMemoryUsageBytes ? *maxMemoryUsageBytes | ||
| 32 | + : internalDocumentSourceGroupMaxMemoryBytes.load())}, | ||
| 33 | // We spill to disk in debug mode, regardless of allowDiskUse, to stress the system. | ||
| 34 | _file(!pExpCtx->inMongos && (pExpCtx->allowDiskUse || kDebugBuild) | ||
| 35 | ? std::make_shared<Sorter<Value, Value>::File>(pExpCtx->tempDir + "/" + | ||
| 36 | -- | ||
| 37 | 2.35.2 | ||
| 38 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index 1215344d97..310a0aa38e 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb | |||
| @@ -11,9 +11,9 @@ DEPENDS = "openssl libpcap zlib boost curl python3 \ | |||
| 11 | 11 | ||
| 12 | inherit scons dos2unix siteinfo python3native systemd useradd | 12 | inherit scons dos2unix siteinfo python3native systemd useradd |
| 13 | 13 | ||
| 14 | PV = "4.4.7" | 14 | PV = "4.4.13" |
| 15 | #v4.4.7 | 15 | #v4.4.13 |
| 16 | SRCREV = "abb6b9c2bf675e9e2aeaecba05f0f8359d99e203" | 16 | SRCREV = "df25c71b8674a78e17468f48bcda5285decb9246" |
| 17 | SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ | 17 | SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ |
| 18 | file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ | 18 | file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ |
| 19 | file://0001-Use-long-long-instead-of-int64_t.patch \ | 19 | file://0001-Use-long-long-instead-of-int64_t.patch \ |
| @@ -29,9 +29,8 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ | |||
| 29 | file://0001-include-needed-c-header.patch \ | 29 | file://0001-include-needed-c-header.patch \ |
| 30 | file://disable_runtime_check.patch \ | 30 | file://disable_runtime_check.patch \ |
| 31 | file://ppc64_ARCH_BITS.patch \ | 31 | file://ppc64_ARCH_BITS.patch \ |
| 32 | file://0001-Do-not-use-MINSIGSTKSZ.patch \ | ||
| 33 | file://0001-Use-explicit-typecast-to-size_t.patch \ | ||
| 34 | file://PTHREAD_STACK_MIN.patch \ | 32 | file://PTHREAD_STACK_MIN.patch \ |
| 33 | file://0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch \ | ||
| 35 | " | 34 | " |
| 36 | SRC_URI:append:libc-musl ="\ | 35 | SRC_URI:append:libc-musl ="\ |
| 37 | file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ | 36 | file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ |
