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

MCOL-3460. Found that indeed this is a worthwhile optimization.

Write and appendtask were breaking the incoming data into 1MB chunks
to call IOC::write/append() with.  Keeping the limit for safety,
but bumping it to 100MB.
This commit is contained in:
Patrick LeBlanc
2019-08-27 14:40:40 -05:00
parent 281443cb0a
commit e5a6e8401e
3 changed files with 6 additions and 4 deletions

View File

@@ -68,7 +68,8 @@ bool AppendTask::run()
ssize_t readCount = 0, writeCount = 0;
vector<uint8_t> databuf;
uint bufsize = min(1 << 20, cmd->count); // 1 MB
uint bufsize = min(100 << 20, cmd->count); // 100 MB
//uint bufsize = cmd->count;
databuf.resize(bufsize);
while (readCount < cmd->count)

View File

@@ -108,7 +108,7 @@ bool PosixTask::read(uint8_t *buf, uint length)
while (count < length)
{
err = ::recv(sock, &buf[count], length - count, 0);
if (err <= 0)
if (err < 0)
return false;
count += err;
@@ -207,7 +207,7 @@ void PosixTask::consumeMsg()
while (remainingLengthInStream > 0)
{
logger->log(LOG_ERR,"ERROR: eating data.");
logger->log(LOG_WARNING, "PosixTask::consumeMsg(): Discarding the tail end of a partial msg.");
err = ::recv(sock, buf, min(remainingLengthInStream, 1024), 0);
if (err <= 0) {
remainingLengthInStream = 0;

View File

@@ -68,7 +68,8 @@ bool WriteTask::run()
ssize_t readCount = 0, writeCount = 0;
vector<uint8_t> databuf;
uint bufsize = min(1 << 20, cmd->count); // 1 MB
uint bufsize = min(100 << 20, cmd->count); // 100 MB
//uint bufsize = cmd->count;
databuf.resize(bufsize);
while (readCount < cmd->count)