You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-520. Made the error msgs users will hit more informative.
This commit is contained in:
@ -96,7 +96,8 @@ bool getshm(const string &name, int size, bi::shared_memory_object &target) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
os << "ProcMon failed to create the 'proc stat' shared mem segment, got " << biex.what();
|
os << "ProcMon failed to create the '" << name << "' shared mem segment, got " << biex.what() << ".";
|
||||||
|
os << " Check the permissions on /dev/shm; should be 1777";
|
||||||
log.writeLog(__LINE__, os.str(), LOG_TYPE_CRITICAL);
|
log.writeLog(__LINE__, os.str(), LOG_TYPE_CRITICAL);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -166,13 +166,25 @@ RWLockShmImpl::RWLockShmImpl(int key, bool excl)
|
|||||||
new (&fState->sems[RWLock::READERS]) bi::interprocess_semaphore(0);
|
new (&fState->sems[RWLock::READERS]) bi::interprocess_semaphore(0);
|
||||||
new (&fState->sems[RWLock::WRITERS]) bi::interprocess_semaphore(0);
|
new (&fState->sems[RWLock::WRITERS]) bi::interprocess_semaphore(0);
|
||||||
}
|
}
|
||||||
catch (bi::interprocess_exception&)
|
catch (bi::interprocess_exception &e)
|
||||||
{
|
{
|
||||||
if (excl)
|
if (e.get_error_code() == bi::security_error) {
|
||||||
|
cerr << "RWLock: Failed to create the lock. Check perms on /dev/shm; should be 1777" << endl;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
if (e.get_error_code() == bi::already_exists_error && excl)
|
||||||
throw not_excl();
|
throw not_excl();
|
||||||
|
if (e.get_error_code() != bi::already_exists_error)
|
||||||
|
throw;
|
||||||
|
|
||||||
|
try {
|
||||||
bi::shared_memory_object shm(bi::open_only, keyName.c_str(), bi::read_write);
|
bi::shared_memory_object shm(bi::open_only, keyName.c_str(), bi::read_write);
|
||||||
fStateShm.swap(shm);
|
fStateShm.swap(shm);
|
||||||
|
}
|
||||||
|
catch (exception &e) {
|
||||||
|
cerr << "RWLock failed to attach to the " << keyName << " shared mem segment, got " << e.what() << endl;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
bi::mapped_region region(fStateShm, bi::read_write);
|
bi::mapped_region region(fStateShm, bi::read_write);
|
||||||
fRegion.swap(region);
|
fRegion.swap(region);
|
||||||
fState = static_cast<State*>(fRegion.get_address());
|
fState = static_cast<State*>(fRegion.get_address());
|
||||||
|
Reference in New Issue
Block a user