1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-5021 non-AUX column files are opened in read-only mode during

the DELETE operation. ColumnOp::readBlock() calls can cause writes
to database files when the active chunk list in ChunkManager is full.
Since non-AUX columns are read-only for the DELETE operation, we prevent
writes of compressed chunks and header for these columns by passing
an isReadOnly flag to CompFileData which indicates whether the column
is read-only or read-write.
This commit is contained in:
Gagan Goel
2022-04-22 17:06:08 -04:00
parent 35a3a93964
commit 60eb0f86ec
9 changed files with 55 additions and 43 deletions

View File

@ -5803,9 +5803,9 @@ int WriteEngineWrapper::writeColumnRecUpdate(const TxnID& txnid, const CSCTypesL
}
string segFile;
bool isFlush = (m_opType != DELETE || !hasAUXCol || (i == colStructList.size() - 1));
bool isReadOnly = (m_opType == DELETE && hasAUXCol && (i != colStructList.size() - 1));
rc = colOp->openColumnFile(curCol, segFile, true, IO_BUFF_SIZE); // @bug 5572 HDFS tmp file
rc = colOp->openColumnFile(curCol, segFile, true, IO_BUFF_SIZE, isReadOnly); // @bug 5572 HDFS tmp file
if (rc != NO_ERROR)
break;
@ -5933,7 +5933,7 @@ int WriteEngineWrapper::writeColumnRecUpdate(const TxnID& txnid, const CSCTypesL
#ifdef PROFILE
timer.start("writeRows ");
#endif
if (!hasAUXCol || (i == colStructList.size() - 1))
if (!isReadOnly)
rc = colOp->writeRows(curCol, totalRow, ridList, valArray, oldValArray, true);
else
rc = colOp->writeRowsReadOnly(curCol, totalRow, ridList, oldValArray);
@ -5945,7 +5945,7 @@ int WriteEngineWrapper::writeColumnRecUpdate(const TxnID& txnid, const CSCTypesL
updateMaxMinRange(1, totalRow, cscColTypeList[i], curColStruct.colType,
m_opType == DELETE ? NULL : valArray, oldValArray, cpInfo, false);
colOp->clearColumn(curCol, isFlush);
colOp->clearColumn(curCol, !isReadOnly);
if (valArray != NULL)
{