【 使用环境 】测试环境
【 其他组件 】obcdc mysql版
【 使用版本 】4.2.1
【问题描述】CDC进程在读取180万条dml后,内存占用达到8G左右,超过限制被kill。配置文件中已设置 memory_limit=2G。
【复现路径】相关代码
IObCDCInstance *obcdc_instance = init(1730095200);
long nth = 0;
while (true) {
Record *record = next(obcdc_instance);
if (record != NULL) {
cout << "parsedOK: " << record->parsedOK() << endl;
if (record->recordType() == EINSERT) {
auto *record_ = (LogRecordImpl *)record;
unsigned int count;
const BinLogBuf *values = record_->filterValues(count);
char *buf = values[1].buf;
cout << "tranid: " << buf << endl;
ITableMeta *tableMeta = NULL;
if (OB_SUCCESS != record->getTableMeta(tableMeta)) {
LOG("[ERROR] get_table_meta failed");
} else {
nth += 1;
cout << "nth: " << nth << endl
<< "db: " << record->dbname() << endl
<< "table: " << tableMeta->getName() << endl
<< "timestamp: " << record->getTimestamp() * 1000000 + record->getRecordUsec() << endl;
}
}
obcdc_instance->release_record(record);
}
}
【附件及日志】