You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
feat(): restore user-space mem allocator
This commit is contained in:
@ -67,9 +67,9 @@ TupleJoiner::TupleJoiner(const rowgroup::RowGroup& smallInput, const rowgroup::R
|
|||||||
// _pool.reset(new boost::shared_ptr<PoolAllocator>[bucketCount]);
|
// _pool.reset(new boost::shared_ptr<PoolAllocator>[bucketCount]);
|
||||||
for (i = 0; i < bucketCount; i++)
|
for (i = 0; i < bucketCount; i++)
|
||||||
{
|
{
|
||||||
// STLPoolAllocator<pair<const long double, Row::Pointer>> alloc(resourceManager_);
|
STLPoolAllocator<pair<const long double, Row::Pointer>> alloc(resourceManager_);
|
||||||
// _pool[i] = alloc.getPoolAllocator();
|
// _pool[i] = alloc.getPoolAllocator();
|
||||||
auto alloc = resourceManager_->getAllocator<pair<const long double, Row::Pointer>>();
|
// auto alloc = resourceManager_->getAllocator<pair<const long double, Row::Pointer>>();
|
||||||
ld[i].reset(new ldhash_t(10, hasher(), ldhash_t::key_equal(), alloc));
|
ld[i].reset(new ldhash_t(10, hasher(), ldhash_t::key_equal(), alloc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,9 +79,9 @@ TupleJoiner::TupleJoiner(const rowgroup::RowGroup& smallInput, const rowgroup::R
|
|||||||
_pool.reset(new boost::shared_ptr<PoolAllocator>[bucketCount]);
|
_pool.reset(new boost::shared_ptr<PoolAllocator>[bucketCount]);
|
||||||
for (i = 0; i < bucketCount; i++)
|
for (i = 0; i < bucketCount; i++)
|
||||||
{
|
{
|
||||||
// STLPoolAllocator<pair<const int64_t, Row::Pointer>> alloc(resourceManager_);
|
STLPoolAllocator<pair<const int64_t, Row::Pointer>> alloc(resourceManager_);
|
||||||
// _pool[i] = alloc.getPoolAllocator();
|
// _pool[i] = alloc.getPoolAllocator();
|
||||||
auto alloc = resourceManager_->getAllocator<pair<const int64_t, Row::Pointer>>();
|
// auto alloc = resourceManager_->getAllocator<pair<const int64_t, Row::Pointer>>();
|
||||||
sth[i].reset(new sthash_t(10, hasher(), sthash_t::key_equal(), alloc));
|
sth[i].reset(new sthash_t(10, hasher(), sthash_t::key_equal(), alloc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,9 +91,9 @@ TupleJoiner::TupleJoiner(const rowgroup::RowGroup& smallInput, const rowgroup::R
|
|||||||
_pool.reset(new boost::shared_ptr<PoolAllocator>[bucketCount]);
|
_pool.reset(new boost::shared_ptr<PoolAllocator>[bucketCount]);
|
||||||
for (i = 0; i < bucketCount; i++)
|
for (i = 0; i < bucketCount; i++)
|
||||||
{
|
{
|
||||||
// STLPoolAllocator<pair<const int64_t, uint8_t*>> alloc(resourceManager_);
|
STLPoolAllocator<pair<const int64_t, uint8_t*>> alloc(resourceManager_);
|
||||||
// _pool[i] = alloc.getPoolAllocator();
|
// _pool[i] = alloc.getPoolAllocator();
|
||||||
auto alloc = resourceManager_->getAllocator<pair<const int64_t, uint8_t*>>();
|
// auto alloc = resourceManager_->getAllocator<pair<const int64_t, uint8_t*>>();
|
||||||
h[i].reset(new hash_t(10, hasher(), hash_t::key_equal(), alloc));
|
h[i].reset(new hash_t(10, hasher(), hash_t::key_equal(), alloc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,9 +184,9 @@ TupleJoiner::TupleJoiner(const rowgroup::RowGroup& smallInput, const rowgroup::R
|
|||||||
ht.reset(new boost::scoped_ptr<typelesshash_t>[bucketCount]);
|
ht.reset(new boost::scoped_ptr<typelesshash_t>[bucketCount]);
|
||||||
for (i = 0; i < bucketCount; i++)
|
for (i = 0; i < bucketCount; i++)
|
||||||
{
|
{
|
||||||
// STLPoolAllocator<pair<const TypelessData, Row::Pointer>> alloc(resourceManager_);
|
STLPoolAllocator<pair<const TypelessData, Row::Pointer>> alloc(resourceManager_);
|
||||||
// _pool[i] = alloc.getPoolAllocator();
|
// _pool[i] = alloc.getPoolAllocator();
|
||||||
auto alloc = resourceManager_->getAllocator<pair<const TypelessData, Row::Pointer>>();
|
// auto alloc = resourceManager_->getAllocator<pair<const TypelessData, Row::Pointer>>();
|
||||||
ht[i].reset(new typelesshash_t(10, hasher(), typelesshash_t::key_equal(), alloc));
|
ht[i].reset(new typelesshash_t(10, hasher(), typelesshash_t::key_equal(), alloc));
|
||||||
}
|
}
|
||||||
m_bucketLocks.reset(new boost::mutex[bucketCount]);
|
m_bucketLocks.reset(new boost::mutex[bucketCount]);
|
||||||
@ -1833,9 +1833,9 @@ void TupleJoiner::clearData()
|
|||||||
|
|
||||||
for (uint i = 0; i < bucketCount; i++)
|
for (uint i = 0; i < bucketCount; i++)
|
||||||
{
|
{
|
||||||
// STLPoolAllocator<pair<const TypelessData, Row::Pointer>> alloc;
|
STLPoolAllocator<pair<const TypelessData, Row::Pointer>> alloc(resourceManager_);
|
||||||
// _pool[i] = alloc.getPoolAllocator();
|
// _pool[i] = alloc.getPoolAllocator();
|
||||||
auto alloc = resourceManager_->getAllocator<pair<const TypelessData, Row::Pointer>>();
|
// auto alloc = resourceManager_->getAllocator<pair<const TypelessData, Row::Pointer>>();
|
||||||
if (typelessJoin)
|
if (typelessJoin)
|
||||||
ht[i].reset(new typelesshash_t(10, hasher(), typelesshash_t::key_equal(), alloc));
|
ht[i].reset(new typelesshash_t(10, hasher(), typelesshash_t::key_equal(), alloc));
|
||||||
else if (smallRG.getColTypes()[smallKeyColumns[0]] == CalpontSystemCatalog::LONGDOUBLE)
|
else if (smallRG.getColTypes()[smallKeyColumns[0]] == CalpontSystemCatalog::LONGDOUBLE)
|
||||||
|
@ -478,22 +478,38 @@ class TupleJoiner
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::unordered_multimap<int64_t, uint8_t*, hasher, std::equal_to<int64_t>,
|
typedef std::unordered_multimap<int64_t, uint8_t*, hasher, std::equal_to<int64_t>,
|
||||||
allocators::CountingAllocator<std::pair<const int64_t, uint8_t*> > >
|
utils::STLPoolAllocator<std::pair<const int64_t, uint8_t*> > >
|
||||||
hash_t;
|
hash_t;
|
||||||
typedef std::unordered_multimap<int64_t, rowgroup::Row::Pointer, hasher, std::equal_to<int64_t>,
|
typedef std::unordered_multimap<int64_t, rowgroup::Row::Pointer, hasher, std::equal_to<int64_t>,
|
||||||
allocators::CountingAllocator<std::pair<const int64_t, rowgroup::Row::Pointer> > >
|
utils::STLPoolAllocator<std::pair<const int64_t, rowgroup::Row::Pointer> > >
|
||||||
sthash_t;
|
sthash_t;
|
||||||
typedef std::unordered_multimap<
|
typedef std::unordered_multimap<
|
||||||
TypelessData, rowgroup::Row::Pointer, hasher, std::equal_to<TypelessData>,
|
TypelessData, rowgroup::Row::Pointer, hasher, std::equal_to<TypelessData>,
|
||||||
allocators::CountingAllocator<std::pair<const TypelessData, rowgroup::Row::Pointer> > >
|
utils::STLPoolAllocator<std::pair<const TypelessData, rowgroup::Row::Pointer> > >
|
||||||
typelesshash_t;
|
typelesshash_t;
|
||||||
// MCOL-1822 Add support for Long Double AVG/SUM small side
|
// MCOL-1822 Add support for Long Double AVG/SUM small side
|
||||||
typedef std::unordered_multimap<
|
typedef std::unordered_multimap<
|
||||||
long double, rowgroup::Row::Pointer, hasher, LongDoubleEq,
|
long double, rowgroup::Row::Pointer, hasher, LongDoubleEq,
|
||||||
allocators::CountingAllocator<std::pair<const long double, rowgroup::Row::Pointer> > >
|
utils::STLPoolAllocator<std::pair<const long double, rowgroup::Row::Pointer> > >
|
||||||
ldhash_t;
|
ldhash_t;
|
||||||
|
|
||||||
|
// typedef std::unordered_multimap<int64_t, uint8_t*, hasher, std::equal_to<int64_t>,
|
||||||
|
// allocators::CountingAllocator<std::pair<const int64_t, uint8_t*> > >
|
||||||
|
// hash_t;
|
||||||
|
// typedef std::unordered_multimap<int64_t, rowgroup::Row::Pointer, hasher, std::equal_to<int64_t>,
|
||||||
|
// allocators::CountingAllocator<std::pair<const int64_t, rowgroup::Row::Pointer> > >
|
||||||
|
// sthash_t;
|
||||||
|
// typedef std::unordered_multimap<
|
||||||
|
// TypelessData, rowgroup::Row::Pointer, hasher, std::equal_to<TypelessData>,
|
||||||
|
// allocators::CountingAllocator<std::pair<const TypelessData, rowgroup::Row::Pointer> > >
|
||||||
|
// typelesshash_t;
|
||||||
|
// // MCOL-1822 Add support for Long Double AVG/SUM small side
|
||||||
|
// typedef std::unordered_multimap<
|
||||||
|
// long double, rowgroup::Row::Pointer, hasher, LongDoubleEq,
|
||||||
|
// allocators::CountingAllocator<std::pair<const long double, rowgroup::Row::Pointer> > >
|
||||||
|
// ldhash_t;
|
||||||
|
|
||||||
typedef hash_t::iterator iterator;
|
typedef hash_t::iterator iterator;
|
||||||
typedef typelesshash_t::iterator thIterator;
|
typedef typelesshash_t::iterator thIterator;
|
||||||
typedef ldhash_t::iterator ldIterator;
|
typedef ldhash_t::iterator ldIterator;
|
||||||
|
Reference in New Issue
Block a user