提交 0110fe7c 编写于 作者: Q qiaojialin 提交者: Xiangdong Huang

fix load file

上级 289cfb05
...@@ -96,7 +96,7 @@ public class TsFileResource { ...@@ -96,7 +96,7 @@ public class TsFileResource {
// This field helps us compare the files that are generated by different IoTDBs that share the // This field helps us compare the files that are generated by different IoTDBs that share the
// same file generation policy but have their own merge policies. // same file generation policy but have their own merge policies.
// https://issues.apache.org/jira/browse/IOTDB-702 for improve this field. // https://issues.apache.org/jira/browse/IOTDB-702 for improve this field.
private Set<Long> historicalVersions; private Set<Long> historicalVersions = new HashSet<>();
private TsFileLock tsFileLock = new TsFileLock(); private TsFileLock tsFileLock = new TsFileLock();
......
...@@ -697,6 +697,10 @@ public class PlanExecutor implements IPlanExecutor { ...@@ -697,6 +697,10 @@ public class PlanExecutor implements IPlanExecutor {
return; return;
} }
TsFileResource tsFileResource = new TsFileResource(file); TsFileResource tsFileResource = new TsFileResource(file);
long fileVersion =
Long.parseLong(
tsFileResource.getTsFile().getName().split(IoTDBConstant.FILE_NAME_SEPARATOR)[1]);
tsFileResource.setHistoricalVersions(Collections.singleton(fileVersion));
tsFileResource.setClosed(true); tsFileResource.setClosed(true);
try { try {
// check file // check file
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册