Caideyipi commented on code in PR #13176:
URL: https://github.com/apache/iotdb/pull/13176#discussion_r1717816915
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java:
##########
@@ -319,6 +328,71 @@ protected String getClusterId() {
return IoTDBDescriptor.getInstance().getConfig().getClusterId();
}
+ @Override
+ protected TSStatus asyncLoadTsFile(final String fileAbsolutePath) throws
Exception {
+
moveToLoadTsFileDirBySequence.set(IOTDB_CONFIG.getLoadActiveListeningPipeDir());
+
+ final File sourceFile = new File(fileAbsolutePath);
+ // whether the move folder equal the listening folder
+ if
(moveToLoadTsFileDirBySequence.get().equals(sourceFile.getParentFile().getAbsolutePath()))
{
Review Comment:
Besides, "pipe_receiver_dir" has one receiver-id suffix, like
/receiver/13/xxxx..... It will not directly equal to the loading dir because
loading dir has no id.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java:
##########
@@ -319,6 +328,71 @@ protected String getClusterId() {
return IoTDBDescriptor.getInstance().getConfig().getClusterId();
}
+ @Override
+ protected TSStatus asyncLoadTsFile(final String fileAbsolutePath) throws
Exception {
+
moveToLoadTsFileDirBySequence.set(IOTDB_CONFIG.getLoadActiveListeningPipeDir());
+
+ final File sourceFile = new File(fileAbsolutePath);
+ // whether the move folder equal the listening folder
+ if
(moveToLoadTsFileDirBySequence.get().equals(sourceFile.getParentFile().getAbsolutePath()))
{
Review Comment:
Will users directly make "load_dir" and "pipe_receiver_dir" the same? That
may cause loader to load writing tsFile which is not complete.. Will generate a
lot of failure logs and waste some resources.
It's actually OK to allow it but I don't think this shall be an encouraged
behaviour...
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]