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

Simlified IOC::open, removed a couple debugging printouts.

This commit is contained in:
Patrick LeBlanc
2019-03-29 08:18:36 -05:00
parent 9be168eb64
commit 52560a72dd
2 changed files with 3 additions and 13 deletions

View File

@@ -336,19 +336,13 @@ int IOCoordinator::open(const char *filename, int openmode, struct stat *out)
if (openmode & O_CREAT) if (openmode & O_CREAT)
{ {
MetadataFile meta(filename); MetadataFile meta(filename);
meta.stat(out); return meta.stat(out);
} }
else else
{ {
MetadataFile meta(filename, MetadataFile::no_create_t()); MetadataFile meta(filename, MetadataFile::no_create_t());
if (!meta.exists()) return meta.stat(out);
{
errno = ENOENT;
return -1;
}
meta.stat(out);
} }
return 0;
#if 0 #if 0
int fd, err; int fd, err;

View File

@@ -196,12 +196,8 @@ int MetadataFile::stat(struct stat *out) const
{ {
int err = ::stat(mFilename.c_str(), out); int err = ::stat(mFilename.c_str(), out);
if (err) if (err)
{
cout << "Failed to stat " << mFilename << endl;
return err; return err;
}
cout << "Got the stat for " << mFilename << endl;
size_t totalSize = 0; size_t totalSize = 0;
for (auto &object : mObjects) for (auto &object : mObjects)
totalSize += object.length; totalSize += object.length;