1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

fix(cmapi, brm): MCOL-5535 Use an accurate glob when forcing owner of files in /dev/shm on startup (#2923)

Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
This commit is contained in:
drrtuy
2023-08-11 18:04:12 +01:00
committed by GitHub
parent 06d7345630
commit 426557380c
5 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,9 @@
include_directories( ${ENGINE_COMMON_INCLUDES} )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shmkeys.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/shmkeys.cpp" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/brmshmimpl.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/brmshmimpl.h" @ONLY)
########### next target ###############

View File

@ -27,7 +27,7 @@
#pragma once
#include <unistd.h>
//#define NDEBUG
// #define NDEBUG
#include <cassert>
#include <boost/interprocess/shared_memory_object.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
@ -131,7 +131,7 @@ class BRMManagedShmImplRBTree : public BRMShmImplParent
private:
// The `segment` name is fixed.
const char* segmentName = "MCS-shm-00020001";
const char* segmentName = "@SHMEM_FILE_GLOB@00020001";
};
} // namespace BRM

View File

@ -63,7 +63,7 @@ ShmKeys::ShmKeys()
string ShmKeys::keyToName(unsigned key)
{
ostringstream oss;
oss << "MCS-shm-";
oss << "@SHMEM_FILE_GLOB@";
oss << setw(8) << setfill('0') << hex << key;
return oss.str();
}