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

Changed debugging outputs.

This commit is contained in:
Patrick LeBlanc
2019-07-22 16:25:31 -05:00
parent 45d4a7536b
commit 094e5b554a
2 changed files with 4 additions and 15 deletions

View File

@@ -9271,25 +9271,11 @@ int ProcessManager::getDBRMData(messageqcpp::IOSocket fIos, std::string moduleNa
// this replaces the stuff that's if-0'd below
boost::filesystem::path pCurrentDbrmFile(currentDbrmFile + "_");
boost::filesystem::path dbrmDir(pCurrentDbrmFile.parent_path());
log.writeLog(__LINE__, "pCurrentDbrmFile is " + pCurrentDbrmFile.string(), LOG_TYPE_DEBUG);
log.writeLog(__LINE__, "pCurrentDbrmFile.filename() is " + pCurrentDbrmFile.filename().string(), LOG_TYPE_DEBUG);
log.writeLog(__LINE__, "dbrmDir is " + dbrmDir.string(), LOG_TYPE_DEBUG);
list<string> fileListing;
vector<string> dbrmFiles;
fs.listDirectory(dbrmDir.string().c_str(), fileListing);
for (const auto &file : fileListing)
{
log.writeLog(__LINE__, "fileListing contains " + file, LOG_TYPE_DEBUG);
// put file in dbrmFiles if it contains the right prefix and is not empty
if (file.find(pCurrentDbrmFile.filename().string()) == 0)
log.writeLog(__LINE__, "this one should go in the set", LOG_TYPE_DEBUG);
else
log.writeLog(__LINE__, "didn't pass the prefix test", LOG_TYPE_DEBUG);
if (fs.size((dbrmDir / file).string().c_str()) == 0)
log.writeLog(__LINE__, "FS says " + (dbrmDir / file).string() + " size = 0", LOG_TYPE_DEBUG);
else
log.writeLog(__LINE__, "FS says " + (dbrmDir / file).string() + " size > 0", LOG_TYPE_DEBUG);
if (file.find(pCurrentDbrmFile.filename().string()) == 0 &&
fs.size((dbrmDir / file).string().c_str()) != 0)
{
@@ -9517,6 +9503,7 @@ int ProcessManager::getDBRMData(messageqcpp::IOSocket fIos, std::string moduleNa
//in >> fdmsg;
log.writeLog(__LINE__, "Sending " + to_string(fdmsg.length()) + " bytes.", LOG_TYPE_DEBUG);
try
{
cfIos.write(fdmsg);

View File

@@ -22,7 +22,7 @@
***************************************************************************/
#include <boost/scoped_ptr.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp>
@@ -4414,6 +4414,8 @@ int ProcessMonitor::getDBRMdata(string *path)
bool journalFile = false;
boost::uuids::uuid u = boost::uuids::random_generator()();
bf::path pTmp = bf::path(*path) / boost::uuids::to_string(u);
if (config::Config::makeConfig()->getConfig("Installation", "DBRootStorageType") != "storagemanager")
bf::create_directories(pTmp);
*path = pTmp.string();
log.writeLog(__LINE__, "Downloading DBRM files to " + *path, LOG_TYPE_DEBUG);