fix: mindrecord seekg failed when shift raw page

pull/1815/head
jonyguo 6 years ago
parent 95ef02af7d
commit 2aaf3a37d4

@ -90,7 +90,7 @@ MSRStatus ShardWriter::OpenDataFiles(bool append) {
fs->close(); fs->close();
// open the mindrecord file to write // 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()) { if (!fs->good()) {
MS_LOG(ERROR) << "MindRecord file could not opened."; MS_LOG(ERROR) << "MindRecord file could not opened.";
return FAILED; return FAILED;

Loading…
Cancel
Save