1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-15 12:09:09 +03:00

In boost < 1.65 +/-, the RNG for uuids isn't threadsafe. Put a lock around it.

This commit is contained in:
Patrick LeBlanc
2019-04-22 11:46:53 -05:00
parent ebc78e0597
commit 39b93dac2d

View File

@@ -328,7 +328,9 @@ void MetadataFile::breakout(const string &key, vector<string> &ret)
string MetadataFile::getNewKeyFromOldKey(const string &key, size_t length)
{
mutex.lock();
boost::uuids::uuid u = boost::uuids::random_generator()();
mutex.unlock();
vector<string> split;
breakout(key, split);
@@ -339,7 +341,9 @@ string MetadataFile::getNewKeyFromOldKey(const string &key, size_t length)
string MetadataFile::getNewKey(string sourceName, size_t offset, size_t length)
{
mutex.lock();
boost::uuids::uuid u = boost::uuids::random_generator()();
mutex.unlock();
stringstream ss;
for (uint i = 0; i < sourceName.length(); i++)