Commit c2a82a65 authored by Michael Davis's avatar Michael Davis
Browse files

[migration] Don't create a tape replica for zero-length files

parent 93b2cec3
......@@ -633,8 +633,10 @@ std::vector<eos::rpc::FileMdProto> EosImportFiles::getNextBatch()
auto btime = m_selectFilesDbRset.columnUint64("BTIME");
file.mutable_xattrs()->insert(google::protobuf::MapPair<std::string,std::string>("eos.btime", std::to_string(btime)));
// Indicate that there is a tape-resident replica of this file
file.mutable_locations()->Add(65535);
// Indicate that there is a tape-resident replica of this file (except for zero-length files)
if(file.size() > 0) {
file.mutable_locations()->Add(65535);
}
// we don't care about unlink_locations (placeholder for files scheduled for deletion)
files.push_back(file);
......
......@@ -164,8 +164,10 @@ void EosTestFileInject::inject(const std::string &path, uint64_t fileid)
// but there is no place in the namespace to store it, so it is stored as an extended attribute.
file.mutable_xattrs()->insert(google::protobuf::MapPair<std::string,std::string>("eos.btime", "1553900400"));
// Indicate that there is a tape-resident replica of this file
file.mutable_locations()->Add(65535);
// Indicate that there is a tape-resident replica of this file (except for zero-length files)
if(file.size() > 0) {
file.mutable_locations()->Add(65535);
}
// we don't care about unlink_locations (placeholder for files scheduled for deletion)
std::vector<eos::rpc::FileMdProto> files;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment