jt2594838 commented on code in PR #19100:
URL: https://github.com/apache/iotdb/pull/19100#discussion_r4452771237
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java:
##########
@@ -2234,6 +2234,11 @@ private void endFile() throws IOException,
TsFileProcessorException {
if (logger.isDebugEnabled()) {
logger.debug(StorageEngineMessages.START_TO_END_FILE, tsFileResource);
}
+ // A table-model TsFile is only recognizable by its non-empty TableSchema
map. Chunks may have
+ // been flushed before registerToTsFile() was called for their table, so
repair the map from the
+ // chunks and the table cache here rather than silently writing a
tree-model-looking file.
+ TsFileTableSchemaRegistrationUtils.ensureTableSchemasForExistingChunks(
+ writer, dataRegionInfo.getDataRegion().getDatabaseName());
writer.endFile();
Review Comment:
Better to avoid this calculation in normal cases?
--
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]