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

@ -161,7 +161,17 @@ struct ExtentSorter
class ExtentMapImpl
{
public:
~ExtentMapImpl(){};
static ExtentMapImpl* makeExtentMapImpl(unsigned key, off_t size, bool readOnly = false);
static void refreshShm()
{
if (fInstance)
{
delete fInstance;
fInstance = NULL;
}
}
inline void grow(unsigned key, off_t size)
#ifdef NDEBUG
@ -199,7 +209,6 @@ public:
private:
ExtentMapImpl(unsigned key, off_t size, bool readOnly = false);
~ExtentMapImpl();
ExtentMapImpl(const ExtentMapImpl& rhs);
ExtentMapImpl& operator=(const ExtentMapImpl& rhs);
@ -212,7 +221,17 @@ private:
class FreeListImpl
{
public:
~FreeListImpl(){};
static FreeListImpl* makeFreeListImpl(unsigned key, off_t size, bool readOnly = false);
static void refreshShm()
{
if (fInstance)
{
delete fInstance;
fInstance = NULL;
}
}
inline void grow(unsigned key, off_t size)
#ifdef NDEBUG
@ -250,7 +269,6 @@ public:
private:
FreeListImpl(unsigned key, off_t size, bool readOnly = false);
~FreeListImpl();
FreeListImpl(const FreeListImpl& rhs);
FreeListImpl& operator=(const FreeListImpl& rhs);