From cc2835067bc19f55632483bba26b67aa6174197d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 Nov 2026 09:08:26 -0800 Subject: [PATCH] mongodb: Backport fix for SERVER-49099 The Node and Head swap() friends and the copy-and-swap assignment operators in Biggie store.h are unused and refer to members that do not exist. Backport the upstream removal. Signed-off-by: Khem Raj AI-Generated: Uses Claude Code --- ...ove-the-Node-swap-function-in-Biggie.patch | 58 +++++++++++++++++++ .../recipes-dbs/mongodb/mongodb_git.bb | 1 + 2 files changed, 59 insertions(+) create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0005-SERVER-49099-Remove-the-Node-swap-function-in-Biggie.patch diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0005-SERVER-49099-Remove-the-Node-swap-function-in-Biggie.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0005-SERVER-49099-Remove-the-Node-swap-function-in-Biggie.patch new file mode 100644 index 0000000000..b2d1d92f30 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0005-SERVER-49099-Remove-the-Node-swap-function-in-Biggie.patch @@ -0,0 +1,58 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Yuhong Zhang +Date: Thu, 9 Jul 2020 15:43:33 +0000 +Subject: [PATCH] SERVER-49099 Remove the Node::swap() function in Biggie + +The Node and Head swap() friends and the copy-and-swap assignment +operators built on them are unused and do not compile: Node::swap() +does not exist and Node has no trieKey, depth, data or children +members (they are _-prefixed). This went unnoticed because they are +in a class template that never instantiates them. + +Upstream-Status: Backport [https://github.com/mongodb/mongo/commit/77ffbcb4f5673b154fe64872cba9f34ce97bc55d] +Signed-off-by: Khem Raj +--- + src/mongo/db/storage/biggie/store.h | 21 --------------------- + 1 file changed, 21 deletions(-) + +diff --git a/src/mongo/db/storage/biggie/store.h b/src/mongo/db/storage/biggie/store.h +index a09b5b4..aeaa337 100644 +--- a/src/mongo/db/storage/biggie/store.h ++++ b/src/mongo/db/storage/biggie/store.h +@@ -809,18 +809,6 @@ private: + + virtual ~Node() = default; + +- friend void swap(Node& first, Node& second) { +- std::swap(first.trieKey, second.trieKey); +- std::swap(first.depth, second.depth); +- std::swap(first.data, second.data); +- std::swap(first.children, second.children); +- } +- +- Node& operator=(const Node other) { +- swap(*this, other); +- return *this; +- } +- + bool isLeaf() const { + for (auto child : _children) { + if (child != nullptr) +@@ -855,17 +843,8 @@ private: + _nextVersion->_hasPreviousVersion = false; + } + +- friend void swap(Head& first, Head& second) { +- Node::swap(first, second); +- } +- + Head(Head&& other) : Node(std::move(other)) {} + +- Head& operator=(const Head other) { +- swap(*this, other); +- return *this; +- } +- + bool hasPreviousVersion() const { + return _hasPreviousVersion; + } 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 e1016681e4..22169ddd64 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 @@ -40,6 +40,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ file://0002-SConstruct-Pass-call-to-CheckLibWithHeader-as-a-keyw.patch \ file://0003-boost-Fix-build-with-clang-23.patch \ file://0004-ssl-Fix-build-with-OpenSSL-4.patch \ + file://0005-SERVER-49099-Remove-the-Node-swap-function-in-Biggie.patch \ " SRC_URI:append:libc-musl = "\ file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \