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

MCOL-5091/MCOL-4917 ExtentMap as RBTree.

This patch replaces a `linear array` to `Red black tree` for ExtentMap.
This commit is contained in:
Denis Khalikov
2022-08-18 22:51:26 +03:00
parent 4e2d4984cf
commit 2f5f9cdbe1
5 changed files with 1781 additions and 1854 deletions

View File

@@ -115,4 +115,23 @@ class BRMManagedShmImpl : public BRMShmImplParent
bi::managed_shared_memory* fShmSegment;
};
class BRMManagedShmImplRBTree : public BRMShmImplParent
{
public:
BRMManagedShmImplRBTree(unsigned key, off_t size, bool readOnly = false);
~BRMManagedShmImplRBTree();
void setReadOnly() override;
int32_t grow(unsigned key, off_t incSize);
void destroy() override;
void reMapSegment();
int clear(unsigned newKey, off_t newSize) override;
boost::interprocess::managed_shared_memory* fShmSegment;
private:
// The `segment` name is fixed.
const char* segmentName = "MCS-shm-00020001";
};
} // namespace BRM