1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

fix(join, disk-based): MCOL-5597: large side read errors (#3117) (#3225)

The large side read errors mentioned there can be due to failure to
close file stream properly. Some of the data may still reside in the
file stream buffers, closing must flush it. The flush is an I/O
operation and can fail, leading to partial write and subsequent partial
read.

This patch tries to provide better diagnostics.

Co-authored-by: Sergey Zefirov <72864488+mariadb-SergeyZefirov@users.noreply.github.com>
This commit is contained in:
Denis Khalikov
2024-06-27 16:24:45 +03:00
committed by GitHub
parent c11cadeef5
commit 985cd94402

View File

@ -854,7 +854,15 @@ uint64_t JoinPartition::writeByteStream(int which, ByteStream& bs)
bs.advance(len);
offset = fs.tellp();
fs.close();
if (fs.fail())
{
ostringstream os;
os << "Disk join file " << filename << ": close() failure, probable exhaustion of disk space." << endl;
throw IDBExcept(os.str().c_str(), ERR_DBJ_FILE_IO_ERROR);
}
return ret;
}