Skip to content

Commit

Permalink
fix IT
Browse files Browse the repository at this point in the history
  • Loading branch information
HTHou committed Nov 28, 2024
1 parent ca2b37a commit 5a007e6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,11 @@ public static void updateTsFileResource(

public static void updateTsFileResource(
Map<IDeviceID, List<TimeseriesMetadata>> device2Metadata, TsFileResource tsFileResource) {
ITimeIndex newTimeIndex = config.getTimeIndexLevel().getTimeIndex();
// For async recover tsfile, there might be a FileTimeIndex, we need a new newTimeIndex
ITimeIndex newTimeIndex =
tsFileResource.getTimeIndex().getTimeIndexType() == ITimeIndex.FILE_TIME_INDEX_TYPE
? config.getTimeIndexLevel().getTimeIndex()
: tsFileResource.getTimeIndex();
for (Map.Entry<IDeviceID, List<TimeseriesMetadata>> entry : device2Metadata.entrySet()) {
for (TimeseriesMetadata timeseriesMetaData : entry.getValue()) {
newTimeIndex.updateStartTime(
Expand Down

0 comments on commit 5a007e6

Please sign in to comment.