1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-18 13:54:11 +03:00

Merge branch 'develop' of github.com:pleblanc1976/storage-manager into develop

This commit is contained in:
Ben Thompson
2019-04-04 17:03:09 -05:00
23 changed files with 152 additions and 71 deletions

View File

@@ -110,10 +110,12 @@ int Replicator::newObject(const char *filename, const uint8_t *data, off_t offse
while (count < length) {
err = ::pwrite(fd, &data[count], length - count, offset);
if (err <= 0)
{
if (count > 0) // return what was successfully written
return count;
else
return err;
}
count += err;
}
@@ -123,7 +125,7 @@ int Replicator::newObject(const char *filename, const uint8_t *data, off_t offse
int Replicator::addJournalEntry(const char *filename, const uint8_t *data, off_t offset, size_t length)
{
int fd, err;
uint64_t offlen[] = {offset,length};
uint64_t offlen[] = {(uint64_t) offset,length};
size_t count = 0;
int version = 1;
string journalFilename = msJournalPath + "/" + string(filename) + ".journal";
@@ -169,10 +171,12 @@ int Replicator::addJournalEntry(const char *filename, const uint8_t *data, off_t
while (count < length) {
err = ::write(fd, &data[count], length - count);
if (err <= 0)
{
if (count > 0) // return what was successfully written
return count;
else
return err;
}
count += err;
}