qiaojialin commented on a change in pull request #1480:
URL: https://github.com/apache/incubator-iotdb/pull/1480#discussion_r454336001
##########
File path:
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
##########
@@ -586,12 +603,23 @@ private void releaseFlushedMemTable(IMemTable memTable) {
}
}
- public static File createNewVMFile(TsFileResource tsFileResource) {
- File parent = tsFileResource.getTsFile().getParentFile();
- return FSFactoryProducer.getFSFactory().getFile(parent,
- tsFileResource.getTsFile().getName() +
IoTDBConstant.FILE_NAME_SEPARATOR + System
- .currentTimeMillis()
- + VM_SUFFIX);
+ public File createNewVMFile(TsFileResource tsFileResource, int level) {
+ vmFileCreateLock.writeLock().lock();
+ try {
+ TimeUnit.MILLISECONDS.sleep(1);
+ File parent = tsFileResource.getTsFile().getParentFile();
+ File newVmFile = FSFactoryProducer.getFSFactory().getFile(parent,
+ tsFileResource.getTsFile().getName() +
IoTDBConstant.FILE_NAME_SEPARATOR + System
+ .currentTimeMillis() + IoTDBConstant.FILE_NAME_SEPARATOR + level
Review comment:
I prefer to put the level ahead of system time...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]