samperson1997 commented on a change in pull request #1384:
URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r443367568
##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -1702,4 +1766,31 @@ public void cacheSchema(String path, MeasurementSchema
schema) {
mRemoteSchemaCache.put(path, schema);
}
}
+
+ private void checkMTreeModified() {
+ if (System.currentTimeMillis() - logFile.lastModified() < 60 * 60 * 1000) {
+ logger.info("MTree snapshot is not created because of active
modification");
+ } else if (logWriter.getLineNumber() - lastSnapshotLogLineNumber <
mtreeSnapshotInterval) {
+ logger.info("MTree snapshot need not be created");
Review comment:
Added
##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -1702,4 +1766,31 @@ public void cacheSchema(String path, MeasurementSchema
schema) {
mRemoteSchemaCache.put(path, schema);
}
}
+
+ private void checkMTreeModified() {
+ if (System.currentTimeMillis() - logFile.lastModified() < 60 * 60 * 1000) {
+ logger.info("MTree snapshot is not created because of active
modification");
+ } else if (logWriter.getLineNumber() - lastSnapshotLogLineNumber <
mtreeSnapshotInterval) {
+ logger.info("MTree snapshot need not be created");
+ } else {
+ lock.writeLock().lock();
Review comment:
Fixed
##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -1702,4 +1766,31 @@ public void cacheSchema(String path, MeasurementSchema
schema) {
mRemoteSchemaCache.put(path, schema);
}
}
+
+ private void checkMTreeModified() {
+ if (System.currentTimeMillis() - logFile.lastModified() < 60 * 60 * 1000) {
Review comment:
Moved as a static final value
----------------------------------------------------------------
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]