jt2594838 commented on code in PR #15604:
URL: https://github.com/apache/iotdb/pull/15604#discussion_r2113655372
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java:
##########
@@ -3064,22 +3082,119 @@ public void loadNewTsFile(
false);
}
+ onTsFileLoaded(newTsFileResource, isFromConsensus, lastReader);
logger.info("TsFile {} is successfully loaded in unsequence list.",
newFileName);
} catch (final DiskSpaceInsufficientException e) {
logger.error(
"Failed to append the tsfile {} to database processor {} because the
disk space is insufficient.",
tsfileToBeInserted.getAbsolutePath(),
tsfileToBeInserted.getParentFile().getName());
throw new LoadFileException(e);
+ } catch (Exception e) {
+ throw new LoadFileException(e);
} finally {
writeUnlock();
+ if (lastReader != null) {
+ try {
+ lastReader.close();
+ } catch (Exception e) {
+ logger.warn("Cannot close last reader after loading TsFile {}",
newTsFileResource, e);
+ }
+ }
// TODO: do more precise control
Review Comment:
Removed
##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensus.java:
##########
@@ -237,7 +237,7 @@ public TSStatus write(ConsensusGroupId groupId,
IConsensusRequest request)
} else if (!impl.isActive()) {
String message =
String.format(
- "Peer is inactive and not ready to write request, %s, DataNode
Id: %s",
+ "Peer is inactive and not ready to write request, %s, DatsaNode
Id: %s",
Review Comment:
Fixed
--
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]