forked from huawei/mindspore2022
fix: mindrecord seekg failed when shift raw page
This commit is contained in:
parent
0e4fab2368
commit
a48a97208b
|
|
@ -90,7 +90,7 @@ MSRStatus ShardWriter::OpenDataFiles(bool append) {
|
|||
fs->close();
|
||||
|
||||
// open the mindrecord file to write
|
||||
fs->open(common::SafeCStr(file), std::ios::out | std::ios::binary);
|
||||
fs->open(common::SafeCStr(file), std::ios::out | std::ios::in | std::ios::binary | std::ios::trunc);
|
||||
if (!fs->good()) {
|
||||
MS_LOG(ERROR) << "MindRecord file could not opened.";
|
||||
return FAILED;
|
||||
|
|
|
|||
Loading…
Reference in New Issue