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
Fixed a race in storagemanager. On startup it would run a connectivity
test to verify it can use S3. The key of the object it tests with is constant, so there can be interference between multiple SM instances that happen to be doing this at the same time. The fix is to include a UUID in the key.
This commit is contained in:
@ -24,6 +24,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <iostream>
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
#include <boost/uuid/random_generator.hpp>
|
||||
#include "Utilities.h"
|
||||
|
||||
using namespace std;
|
||||
@ -154,7 +157,11 @@ void S3Storage::testConnectivityAndPerms()
|
||||
{
|
||||
boost::shared_array<uint8_t> testObj(new uint8_t[1]);
|
||||
testObj[0] = 0;
|
||||
string testObjKey("connectivity_test");
|
||||
boost::uuids::uuid u = boost::uuids::random_generator()();
|
||||
ostringstream oss;
|
||||
oss << u << "connectivity_test";
|
||||
|
||||
string testObjKey = oss.str();
|
||||
|
||||
int err = putObject(testObj, 1, testObjKey);
|
||||
if (err)
|
||||
|
Reference in New Issue
Block a user