1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-27 21:01:50 +03:00

MCOL-4330 dev Refresh shared memory

If the plugin is restarted after the system is running, it's possible to have stale references to shared memory. This patch deletes those references so the next time they're used, just-in-time initialization will get the latest.
This commit is contained in:
David Hall
2020-10-01 18:19:03 -05:00
parent 1f1ce5bf07
commit 951a6abe85
6 changed files with 46 additions and 11 deletions

View File

@ -64,14 +64,23 @@ struct MSTEntry
class MasterSegmentTableImpl
{
public:
~MasterSegmentTableImpl(){};
static MasterSegmentTableImpl* makeMasterSegmentTableImpl(int key, int size);
static void refreshShm()
{
if (fInstance)
{
delete fInstance;
fInstance = NULL;
}
}
boost::interprocess::shared_memory_object fShmobj;
boost::interprocess::mapped_region fMapreg;
private:
MasterSegmentTableImpl(int key, int size);
~MasterSegmentTableImpl();
MasterSegmentTableImpl(const MasterSegmentTableImpl& rhs);
MasterSegmentTableImpl& operator=(const MasterSegmentTableImpl& rhs);
@ -90,7 +99,6 @@ public:
* @note Throws runtime_error on a semaphore-related error.
*/
EXPORT MasterSegmentTable();
//MasterSegmentTable(const MasterSegmentTable& mst);
EXPORT ~MasterSegmentTable();
/// specifies the Extent Map table