choubenson commented on code in PR #12221:
URL: https://github.com/apache/iotdb/pull/12221#discussion_r1579018001
##########
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/utils/MultiTsFileDeviceIteratorTest.java:
##########
@@ -82,6 +90,70 @@ public void tearDown() throws IOException,
StorageEngineException {
Thread.currentThread().setName(oldThreadName);
}
+ @Test
+ public void testMeasurementIterator() throws IOException, MetadataException {
+ TsFileResource resource1 = createEmptyFileAndResource(true);
+ try (CompactionTestFileWriter writer = new
CompactionTestFileWriter(resource1)) {
+ writer.startChunkGroup("d1");
+ for (int i = 1000; i < 2000; i++) {
+ writer.generateSimpleNonAlignedSeriesToCurrentDevice(
+ "s" + i,
+ new TimeRange[] {new TimeRange(10, 20)},
+ TSEncoding.PLAIN,
+ CompressionType.LZ4);
+ }
+ writer.endChunkGroup();
+ writer.endFile();
+ }
+ resource1.setStatusForTest(TsFileResourceStatus.COMPACTING);
+
+ seqResources.add(resource1);
+
+ TsFileResource resource2 = createEmptyFileAndResource(true);
+ try (CompactionTestFileWriter writer = new
CompactionTestFileWriter(resource2)) {
+ writer.startChunkGroup("d1");
+ for (int i = 1000; i < 5000; i++) {
+ writer.generateSimpleNonAlignedSeriesToCurrentDevice(
+ "s" + i,
+ new TimeRange[] {new TimeRange(30, 40)},
+ TSEncoding.PLAIN,
+ CompressionType.LZ4);
+ }
+ writer.endChunkGroup();
+ writer.endFile();
+ }
+ resource2.setStatusForTest(TsFileResourceStatus.COMPACTING);
+
+ seqResources.add(resource2);
+
+ Set<String> measurementSet = new HashSet<>(4000);
Review Comment:
Change it to a list type so that we can detect whether there are unmerged
series. Otherwise, this UT (unit test) can still pass as before.
--
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]