Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions percona-packaging/redhat/percona-server-mongodb.spec.template
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ export CC=${CC:-gcc}
export CXX=${CXX:-g++}
export PSM_TARGETS="install-mongod install-mongos install-mongo install-perconadecrypt build/install/bin/mongobridge"
export INSTALLDIR=$RPM_BUILD_DIR/install
export INSTALLDIR_AWS=$RPM_BUILD_DIR/install_aws
export AWS_LIBS="/usr/local"
export TOOLS_TAGS="ssl sasl"
export PORTABLE=1
export USE_SSE=1
Expand All @@ -161,24 +159,6 @@ export GOPATH=$(pwd)/
export PATH="/usr/local/go/bin:$PATH:$GOPATH"
export GOBINPATH="/usr/local/go/bin"

#aws-sdk-cpp
pushd $RPM_BUILD_DIR/%{src_dir}/aws-sdk-cpp
pushd build
%if 0%{?amzn} == 2023 || 0%{?rhel} >= 7
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;transfer" -DBUILD_SHARED_LIBS=OFF -DMINIMIZE_SIZE=ON -DCMAKE_INSTALL_PREFIX="${INSTALLDIR_AWS}" -DAUTORUN_UNIT_TESTS=OFF
cmake --build . --target install
%else
cmake3 CC=${CC} CXX=${CXX} .. -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;transfer" -DBUILD_SHARED_LIBS=OFF -DMINIMIZE_SIZE=ON -DCMAKE_INSTALL_PREFIX="${INSTALLDIR_AWS}" -DAUTORUN_UNIT_TESTS=OFF
cmake3 --build . --target install
%endif

popd
popd
mkdir -p ${INSTALLDIR}/include/
mkdir -p ${INSTALLDIR}/lib/
mv ${INSTALLDIR_AWS}/include/* ${INSTALLDIR}/include/
mv ${INSTALLDIR_AWS}/lib*/* ${INSTALLDIR}/lib/

# Build PSfMDB with SCons
pushd $RPM_BUILD_DIR/%{src_dir}
%if 0%{?amzn} == 2023
Expand Down
81 changes: 1 addition & 80 deletions percona-packaging/scripts/psmdb_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,7 @@ get_sources(){
source ~/.bashrc
sed -i 's:build-id:build-id=sha1:' SConstruct

git clone https://github.com/aws/aws-sdk-cpp.git
cd aws-sdk-cpp
git reset --hard
git clean -xdf
git checkout 1.9.379
git submodule update --init --recursive
mkdir build
cd ../../
cd ../
tar --owner=0 --group=0 --exclude=.* -czf ${PRODUCT}-${PSM_VER}-${PSM_RELEASE}.tar.gz ${PRODUCT}-${PSM_VER}-${PSM_RELEASE}
echo "UPLOAD=UPLOAD/experimental/BUILDS/${PRODUCT}-8.0/${PRODUCT}-${PSM_VER}-${PSM_RELEASE}/${PSM_BRANCH}/${REVISION}/${BUILD_ID}" >> percona-server-mongodb-80.properties
mkdir -p $WORKDIR/source_tarball
Expand Down Expand Up @@ -312,33 +305,6 @@ fix_rules(){
return
}

aws_sdk_build(){
cd $WORKDIR
git clone https://github.com/aws/aws-sdk-cpp.git
cd aws-sdk-cpp
git reset --hard
git clean -xdf
git checkout 1.9.379
git submodule update --init --recursive
mkdir build
cd build
CMAKE_CMD="cmake"
set_compiler
CMAKE_CXX_FLAGS=""
if [ x"${DEBIAN}" = xjammy -o x"${DEBIAN}" = xbookworm -o x"${DEBIAN}" = xnoble ]; then
CMAKE_CXX_FLAGS=" -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=uninitialized "
CMAKE_C_FLAGS=" -Wno-error=maybe-uninitialized -Wno-error=maybe-uninitialized -Wno-error=uninitialized "
fi
if [ -z "${CC}" -a -z "${CXX}" ]; then
${CMAKE_CMD} .. -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;transfer" -DBUILD_SHARED_LIBS=OFF -DMINIMIZE_SIZE=ON -DAUTORUN_UNIT_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr || exit $?
else
${CMAKE_CMD} CC=${CC} CXX=${CXX} .. -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;transfer" -DBUILD_SHARED_LIBS=OFF -DMINIMIZE_SIZE=ON -DAUTORUN_UNIT_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr || exit $?
fi
make -j${NCPU} || exit $?
make install
cd ${WORKDIR}
}

install_deps() {
if [ $INSTALL = 0 ]
then
Expand Down Expand Up @@ -476,7 +442,6 @@ install_deps() {
easy_install pip
pip install setuptools
fi
aws_sdk_build
#keep symbol table in the binary
sed -i 's:$strip, "--remove-section=.comment":$strip, "--strip-debug", "--remove-section=.comment":g' /usr/bin/dh_strip
return;
Expand Down Expand Up @@ -1003,7 +968,6 @@ build_tarball(){
export CXXFLAGS="${CFLAGS} -Wno-error=deprecated-declarations"
fi
export INSTALLDIR=/usr/local
export AWS_LIBS=/usr/local
export PORTABLE=1
export USE_SSE=1
#
Expand All @@ -1030,49 +994,6 @@ build_tarball(){
fi
poetry install --no-root --sync

if [ -f /etc/redhat-release -o -f /etc/amazon-linux-release ]; then
if [ $RHEL = 7 -o $RHEL = 8 ]; then
if [ -d aws-sdk-cpp ]; then
rm -rf aws-sdk-cpp
fi
export INSTALLDIR=$PWD/../install
export INSTALLDIR_AWS=$PWD/../install_aws
git clone https://github.com/aws/aws-sdk-cpp.git
cd aws-sdk-cpp
git reset --hard
git clean -xdf
git checkout 1.9.379
git submodule update --init --recursive
if [[ x"${RHEL}" =~ ^x(7|8|9|2023)$ ]]; then
sed -i 's:v0.4.42:v0.6.10:' third-party/CMakeLists.txt
sed -i 's:"-Werror" ::' cmake/compiler_settings.cmake
fi
mkdir build
cd build
set_compiler
if [ x"${DEBIAN}" = xjammy ]; then
CMAKE_CXX_FLAGS=" -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=uninitialized "
CMAKE_C_FLAGS=" -Wno-error=maybe-uninitialized -Wno-error=maybe-uninitialized -Wno-error=uninitialized "
fi
CMAKE_CMD="cmake"
# if [ x"$RHEL" = x7 ]; then
# CMAKE_CMD="cmake3"
# fi
if [ -z "${CC}" -a -z "${CXX}" ]; then
${CMAKE_CMD} .. -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;transfer" -DBUILD_SHARED_LIBS=OFF -DMINIMIZE_SIZE=ON -DCMAKE_INSTALL_PREFIX="${INSTALLDIR_AWS}" -DAUTORUN_UNIT_TESTS=OFF || exit $?
else
${CMAKE_CMD} CC=${CC} CXX=${CXX} .. -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;transfer" -DBUILD_SHARED_LIBS=OFF -DMINIMIZE_SIZE=ON -DCMAKE_INSTALL_PREFIX="${INSTALLDIR_AWS}" -DAUTORUN_UNIT_TESTS=OFF || exit $?
fi
make -j${NCPU} || exit $?
make install
mkdir -p ${INSTALLDIR}/include/
mkdir -p ${INSTALLDIR}/lib/
mv ${INSTALLDIR_AWS}/include/* ${INSTALLDIR}/include/
mv ${INSTALLDIR_AWS}/lib*/* ${INSTALLDIR}/lib/
cd ../../

fi
fi
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
if [ "x${RHEL}" == "x2023" ]; then
export OPT_LINKFLAGS="${LINKFLAGS} -Wl,--build-id=sha1 "
Expand Down
5 changes: 5 additions & 0 deletions src/mongo/db/repl/initial_syncer_fcb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,11 @@ Status InitialSyncerFCB::_switchStorageLocation(

catalog::openCatalogAfterStorageChange(opCtx);

// At this point we might have the recovery unit with an active WT transaction.
// Abandon the snapshot so the RU is kInactive before callers invoke setMinValid(), which
// calls allowOneUntimestampedWrite() and invariants on !_isActive().
shard_role_details::getRecoveryUnit(opCtx)->abandonSnapshot();

LOGV2_DEBUG(128415, 1, "Switched storage location", "newLocation"_attr = newLocation);
return Status::OK();
} catch (const DBException& e) {
Expand Down
17 changes: 15 additions & 2 deletions src/third_party/aws-sdk-cpp/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ AWS_C_COMMON_INCLUDE = select({
"//conditions:default": [],
})

AWS_C_COMMON_HEADER_DIR = select({
"@platforms//cpu:x86_64": ["platform/linux_x86_64/crt/aws-crt-cpp/crt/aws-c-common/generated/include"],
"@platforms//cpu:aarch64": ["platform/linux_aarch64/crt/aws-crt-cpp/crt/aws-c-common/generated/include"],
"//conditions:default": [],
})

AWS_C_COMMON_HEADER_FILE = select({
"@platforms//cpu:x86_64": ["platform/linux_x86_64/crt/aws-crt-cpp/crt/aws-c-common/generated/include/aws/common/config.h"],
"@platforms//cpu:aarch64": ["platform/linux_aarch64/crt/aws-crt-cpp/crt/aws-c-common/generated/include/aws/common/config.h"],
"//conditions:default": [],
})

AWS_CRT_CPP_INCLUDE = select({
# Platform specific source file include path
# TODO https://jira.mongodb.org/browse/SERVER-74961: Support other platforms.
Expand Down Expand Up @@ -1179,11 +1191,12 @@ mongo_cc_library(

mongo_cc_library(
name = "aws-sdk",
hdrs = glob([
hdrs = AWS_C_COMMON_HEADER_FILE + glob([
"dist/include/**/*.h",
"dist/include/**/*.inl",
]),
includes = ["dist/include"],
includes = AWS_C_COMMON_HEADER_DIR + ["dist/include"],
target_compatible_with = TARGET_COMPATIBILITY,
deps = [
"aws-cpp-sdk-core",
"aws-cpp-sdk-s3",
Expand Down
33 changes: 0 additions & 33 deletions src/third_party/aws-sdk-cpp/dist/include/aws/common/config.h

This file was deleted.

3 changes: 3 additions & 0 deletions src/third_party/aws-sdk-cpp/scripts/import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ find . -type d \
\( -name "darwin" -o -name "windows" -o -name "android" -o -name "msvc" -o -name "msvc" -o \
-name "platform_fallback_stubs" -o -name "huffman_generator" -o -name "bsd" \) \
-exec rm -rf {} \; || true
# The `config.h` file is platform-dependent and a dedicated version for each
# supported platform exists in the `${PLATFORM_DIR}` directory.
rm -f include/aws/common/config.h

pushd ${DIST_DIR}/src
find . -maxdepth 1 -type d \
Expand Down
Loading