diff --git a/cmake/boost.cmake b/cmake/boost.cmake index c166de348..eefb81389 100644 --- a/cmake/boost.cmake +++ b/cmake/boost.cmake @@ -1,4 +1,4 @@ -find_package(Boost 1.84.0 COMPONENTS chrono filesystem program_options regex system thread) +find_package(Boost 1.88.0 COMPONENTS chrono filesystem program_options regex system thread) if(Boost_FOUND) add_custom_target(external_boost) @@ -9,9 +9,6 @@ include(ExternalProject) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(_toolset "gcc") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0") - set(_extra "pch=off") - endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") set(_toolset "clang") elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") @@ -42,8 +39,8 @@ endforeach() ExternalProject_Add( external_boost PREFIX .boost - URL https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.gz - URL_HASH SHA256=a5800f405508f5df8114558ca9855d2640a2de8f0445f051fa1c7c3383045724 + URL https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.gz + URL_HASH SHA256=3621533e820dcab1e8012afd583c0c73cf0f77694952b81352bf38c1488f9cb4 CONFIGURE_COMMAND ./bootstrap.sh UPDATE_COMMAND "" BUILD_COMMAND ./b2 -q ${_b2args} diff --git a/ddlproc/ddlproc.cpp b/ddlproc/ddlproc.cpp index f58de6078..541945db7 100644 --- a/ddlproc/ddlproc.cpp +++ b/ddlproc/ddlproc.cpp @@ -40,8 +40,6 @@ using namespace oam; #include "distributedenginecomm.h" using namespace joblist; -// #include "boost/filesystem/operations.hpp" -// #include "boost/filesystem/path.hpp" #include #include #include diff --git a/dmlproc/dmlproc.cpp b/dmlproc/dmlproc.cpp index dec25979f..0bc59e2e0 100644 --- a/dmlproc/dmlproc.cpp +++ b/dmlproc/dmlproc.cpp @@ -25,8 +25,6 @@ #include #include #include -// #include "boost/filesystem/operations.hpp" -// #include "boost/filesystem/path.hpp" using namespace std; #include "liboamcpp.h" diff --git a/oamapps/columnstoreSupport/columnstoreSupport.cpp b/oamapps/columnstoreSupport/columnstoreSupport.cpp index d7bf28a9b..51bd670b9 100644 --- a/oamapps/columnstoreSupport/columnstoreSupport.cpp +++ b/oamapps/columnstoreSupport/columnstoreSupport.cpp @@ -255,11 +255,11 @@ void* reportThread(string* reporttype) boost::filesystem::path configFile = std::string(MCSSYSCONFDIR) + std::string("/columnstore/Columnstore.xml"); boost::filesystem::copy_file(configFile, "./Columnstore.xml", - boost::filesystem::copy_option::overwrite_if_exists); + boost::filesystem::copy_options::overwrite_existing); boost::filesystem::path SMconfigFile = std::string(MCSSYSCONFDIR) + std::string("/columnstore/storagemanager.cnf"); boost::filesystem::copy_file(SMconfigFile, "./storagemanager.cnf", - boost::filesystem::copy_option::overwrite_if_exists); + boost::filesystem::copy_options::overwrite_existing); system("sed -i 's/.*aws_access_key_id.*/aws_access_key_id={PRIVATE}/' ./storagemanager.cnf"); system("sed -i 's/.*aws_secret_access_key.*/aws_secret_access_key={PRIVATE}/' ./storagemanager.cnf"); fclose(pOutputFile); @@ -857,7 +857,7 @@ int main(int argc, char* argv[]) boost::filesystem::path configFile = std::string(MCSMYCNFDIR) + "/columnstore.cnf"; boost::filesystem::copy_file(configFile, "./columnstore.cnf", - boost::filesystem::copy_option::overwrite_if_exists); + boost::filesystem::copy_options::overwrite_existing); } int wait = 0; diff --git a/primitives/primproc/primitiveserver.cpp b/primitives/primproc/primitiveserver.cpp index 06c9f2ad9..bcded840a 100644 --- a/primitives/primproc/primitiveserver.cpp +++ b/primitives/primproc/primitiveserver.cpp @@ -142,8 +142,8 @@ int noVB = 0; BPPMap bppMap; boost::mutex bppLock; -boost::mutex djMutex; // lock for djLock, lol. -std::map djLock; // djLock synchronizes destroy and joiner msgs, see bug 2619 +boost::mutex djMutex; // lock for djLock, lol. +std::map djLock; // djLock synchronizes destroy and joiner msgs, see bug 2619 volatile int32_t asyncCounter; const int asyncMax = 20; // current number of asynchronous loads @@ -1430,7 +1430,7 @@ struct BPPHandler return SBPPV(); } - inline shared_mutex& getDJLock(uint32_t uniqueID) + inline boost::shared_mutex& getDJLock(uint32_t uniqueID) { boost::mutex::scoped_lock lk(djMutex); auto it = djLock.find(uniqueID); @@ -1438,7 +1438,7 @@ struct BPPHandler return *it->second; else { - auto ret = djLock.insert(make_pair(uniqueID, new shared_mutex())).first; + auto ret = djLock.insert(make_pair(uniqueID, new boost::shared_mutex())).first; return *ret->second; } } @@ -1470,7 +1470,7 @@ struct BPPHandler if (bppv) { - shared_lock lk(getDJLock(uniqueID)); + boost::shared_lock lk(getDJLock(uniqueID)); bppv->get()[0]->addToJoiner(bs); return 0; } @@ -1513,7 +1513,7 @@ struct BPPHandler } } - boost::unique_lock lk(getDJLock(uniqueID)); + boost::unique_lock lk(getDJLock(uniqueID)); for (i = 0; i < bppv->get().size(); i++) { err = bppv->get()[i]->endOfJoiner(); @@ -1555,7 +1555,12 @@ struct BPPHandler bs >> stepID; bs >> uniqueID; - boost::shared_ptr bppv = nullptr; + boost::unique_lock lk(getDJLock(uniqueID)); + boost::mutex::scoped_lock scoped(bppLock); + + bppKeysIt = std::find(bppKeys.begin(), bppKeys.end(), uniqueID); + + if (bppKeysIt != bppKeys.end()) { boost::unique_lock lk(getDJLock(uniqueID)); boost::mutex::scoped_lock scoped(bppLock); diff --git a/storage-manager/src/LocalStorage.cpp b/storage-manager/src/LocalStorage.cpp index 45e520974..af0509860 100644 --- a/storage-manager/src/LocalStorage.cpp +++ b/storage-manager/src/LocalStorage.cpp @@ -94,7 +94,7 @@ inline void LocalStorage::addLatency() int LocalStorage::copy(const bf::path& source, const bf::path& dest) { boost::system::error_code err; - bf::copy_file(source, dest, bf::copy_option::fail_if_exists, err); + bf::copy_file(source, dest, bf::copy_options::none, err); if (err) { errno = err.value(); diff --git a/storage-manager/src/Ownership.cpp b/storage-manager/src/Ownership.cpp index 122b0ec78..ddb26482f 100644 --- a/storage-manager/src/Ownership.cpp +++ b/storage-manager/src/Ownership.cpp @@ -77,7 +77,7 @@ bf::path Ownership::get(const bf::path& p, bool getOwnership) bf::path::const_iterator pit; int i, levels; - normalizedPath.normalize(); + normalizedPath.lexically_normal(); // cerr << "Ownership::get() param = " << normalizedPath.string() << endl; if (prefixDepth > 0) { diff --git a/tools/ddlcleanup/ddlcleanup.cpp b/tools/ddlcleanup/ddlcleanup.cpp index 6d1ca008a..6130868e4 100644 --- a/tools/ddlcleanup/ddlcleanup.cpp +++ b/tools/ddlcleanup/ddlcleanup.cpp @@ -26,8 +26,8 @@ #include #include #include -#include "boost/filesystem/operations.hpp" -#include "boost/filesystem/path.hpp" +#include "boost/filesystem.hpp" + using namespace std; #include "rwlock.h" diff --git a/utils/configcpp/configcpp.cpp b/utils/configcpp/configcpp.cpp index 77330b364..11a8b0a0c 100644 --- a/utils/configcpp/configcpp.cpp +++ b/utils/configcpp/configcpp.cpp @@ -370,7 +370,7 @@ void Config::writeConfig(const string& configFile) const { } - fs::copy_file(dcf, scft, fs::copy_option::overwrite_if_exists); + fs::copy_file(dcf, scft, fs::copy_options::overwrite_existing); try { diff --git a/utils/idbdatafile/IDBPolicy.cpp b/utils/idbdatafile/IDBPolicy.cpp index f90f0c256..f2c1ccb80 100644 --- a/utils/idbdatafile/IDBPolicy.cpp +++ b/utils/idbdatafile/IDBPolicy.cpp @@ -19,8 +19,8 @@ #include #include #include -#include #include +#include #include "configcpp.h" // for Config #include "oamcache.h" diff --git a/utils/idbdatafile/PosixFileSystem.cpp b/utils/idbdatafile/PosixFileSystem.cpp index cb58dd099..1adda2202 100644 --- a/utils/idbdatafile/PosixFileSystem.cpp +++ b/utils/idbdatafile/PosixFileSystem.cpp @@ -24,8 +24,7 @@ #include #include -#include -#include +#include using namespace std; diff --git a/versioning/BRM/extentmap.h b/versioning/BRM/extentmap.h index 67c42d81b..05d340b5a 100644 --- a/versioning/BRM/extentmap.h +++ b/versioning/BRM/extentmap.h @@ -40,7 +40,10 @@ #include #include #include + + #include + #include #include #include diff --git a/writeengine/bulk/we_bulkload.cpp b/writeengine/bulk/we_bulkload.cpp index 98bad9028..9d259abc1 100644 --- a/writeengine/bulk/we_bulkload.cpp +++ b/writeengine/bulk/we_bulkload.cpp @@ -34,10 +34,11 @@ #include #include #include -#include -#include + +#include #include #include + #include #include "we_bulkstatus.h" diff --git a/writeengine/redistribute/we_redistributecontrol.cpp b/writeengine/redistribute/we_redistributecontrol.cpp index e90878e19..c314fdbd6 100644 --- a/writeengine/redistribute/we_redistributecontrol.cpp +++ b/writeengine/redistribute/we_redistributecontrol.cpp @@ -36,8 +36,7 @@ using namespace std; #include "boost/scoped_array.hpp" #include "boost/thread.hpp" #include "boost/thread/mutex.hpp" -#include "boost/filesystem/path.hpp" -#include "boost/filesystem/operations.hpp" +#include "boost/filesystem.hpp" using namespace boost; #include "installdir.h" diff --git a/writeengine/redistribute/we_redistributecontrolthread.cpp b/writeengine/redistribute/we_redistributecontrolthread.cpp index 774f40118..7caa14b05 100644 --- a/writeengine/redistribute/we_redistributecontrolthread.cpp +++ b/writeengine/redistribute/we_redistributecontrolthread.cpp @@ -33,8 +33,7 @@ using namespace std; #include "boost/scoped_ptr.hpp" #include "boost/scoped_array.hpp" #include "boost/thread/mutex.hpp" -#include "boost/filesystem/path.hpp" -#include "boost/filesystem/operations.hpp" +#include "boost/filesystem.hpp" using namespace boost; #include "mcsconfig.h" diff --git a/writeengine/redistribute/we_redistributeworkerthread.cpp b/writeengine/redistribute/we_redistributeworkerthread.cpp index 524e2c198..1cd33c8a7 100644 --- a/writeengine/redistribute/we_redistributeworkerthread.cpp +++ b/writeengine/redistribute/we_redistributeworkerthread.cpp @@ -32,8 +32,7 @@ using namespace std; #include "boost/scoped_ptr.hpp" #include "boost/scoped_array.hpp" #include "boost/thread/mutex.hpp" -#include "boost/filesystem/path.hpp" -#include "boost/filesystem/operations.hpp" +#include "boost/filesystem.hpp" using namespace boost; #include "installdir.h" diff --git a/writeengine/server/we_ddlcommandproc.cpp b/writeengine/server/we_ddlcommandproc.cpp index c6ca0152b..350647ab1 100644 --- a/writeengine/server/we_ddlcommandproc.cpp +++ b/writeengine/server/we_ddlcommandproc.cpp @@ -19,8 +19,7 @@ // $Id: we_ddlcommandproc.cpp 3082 2011-09-26 22:00:38Z chao $ #include -#include "boost/filesystem/operations.hpp" -#include "boost/filesystem/path.hpp" +#include "boost/filesystem.hpp" #include "boost/scoped_ptr.hpp" using namespace std; diff --git a/writeengine/shared/we_bulkrollbackfilecompressed.cpp b/writeengine/shared/we_bulkrollbackfilecompressed.cpp index bdeecf5e9..23907cdce 100644 --- a/writeengine/shared/we_bulkrollbackfilecompressed.cpp +++ b/writeengine/shared/we_bulkrollbackfilecompressed.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include "we_define.h" #include "we_fileop.h" diff --git a/writeengine/shared/we_bulkrollbackfilecompressedhdfs.cpp b/writeengine/shared/we_bulkrollbackfilecompressedhdfs.cpp index 9cd9ff353..a05bb1fd4 100644 --- a/writeengine/shared/we_bulkrollbackfilecompressedhdfs.cpp +++ b/writeengine/shared/we_bulkrollbackfilecompressedhdfs.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include "we_define.h" #include "we_fileop.h" diff --git a/writeengine/shared/we_bulkrollbackmgr.cpp b/writeengine/shared/we_bulkrollbackmgr.cpp index 0fc93729f..9c02a81b5 100644 --- a/writeengine/shared/we_bulkrollbackmgr.cpp +++ b/writeengine/shared/we_bulkrollbackmgr.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include "we_bulkrollbackmgr.h" diff --git a/writeengine/shared/we_rbmetawriter.cpp b/writeengine/shared/we_rbmetawriter.cpp index f7c61b685..1993d2149 100644 --- a/writeengine/shared/we_rbmetawriter.cpp +++ b/writeengine/shared/we_rbmetawriter.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include "we_config.h" #include "we_convertor.h" diff --git a/writeengine/xml/we_xmljob.cpp b/writeengine/xml/we_xmljob.cpp index 2a919bd5e..f37efeaeb 100644 --- a/writeengine/xml/we_xmljob.cpp +++ b/writeengine/xml/we_xmljob.cpp @@ -37,9 +37,7 @@ #include "we_convertor.h" #include "dataconvert.h" #include -#include -#include - +#include #include using namespace std;