Skip to content

Commit cfc2b68

Browse files
committed
Merge branch 'dev/1.3' of https://github.com/apache/iotdb into cp-fast-last-n
2 parents 8241d89 + 2dc75e7 commit cfc2b68

715 files changed

Lines changed: 16373 additions & 12296 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cluster-it-1c3d.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Set up JDK ${{ matrix.java }}
4747
uses: actions/setup-java@v4
4848
with:
49-
distribution: liberica
49+
distribution: oracle
5050
java-version: ${{ matrix.java }}
5151
- name: IT/UT Test
5252
shell: bash

.github/workflows/daily-it.yml

Lines changed: 430 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/pipe-it-2cluster.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
matrix:
4242
java: [17]
4343
# StrongConsistencyClusterMode is ignored now because RatisConsensus has not been supported yet.
44-
cluster: [LightWeightStandaloneMode, ScalableSingleNodeMode, HighPerformanceMode]
44+
cluster: [HighPerformanceMode]
4545
os: [ ubuntu-latest ]
4646
runs-on: ${{ matrix.os }}
4747
steps:
@@ -126,18 +126,9 @@ jobs:
126126
matrix:
127127
java: [17]
128128
# StrongConsistencyClusterMode is ignored now because RatisConsensus has not been supported yet.
129-
cluster1: [LightWeightStandaloneMode, ScalableSingleNodeMode, HighPerformanceMode]
130-
cluster2: [LightWeightStandaloneMode, ScalableSingleNodeMode, HighPerformanceMode]
129+
cluster1: [HighPerformanceMode]
130+
cluster2: [HighPerformanceMode]
131131
os: [ ubuntu-latest ]
132-
exclude:
133-
- cluster1: LightWeightStandaloneMode
134-
cluster2: LightWeightStandaloneMode
135-
- cluster1: LightWeightStandaloneMode
136-
cluster2: ScalableSingleNodeMode
137-
- cluster1: ScalableSingleNodeMode
138-
cluster2: LightWeightStandaloneMode
139-
- cluster1: HighPerformanceMode
140-
cluster2: LightWeightStandaloneMode
141132
runs-on: ${{ matrix.os }}
142133
steps:
143134
- uses: actions/checkout@v4
@@ -219,7 +210,7 @@ jobs:
219210
matrix:
220211
java: [ 17 ]
221212
# StrongConsistencyClusterMode is ignored now because RatisConsensus has not been supported yet.
222-
cluster1: [ LightWeightStandaloneMode, ScalableSingleNodeMode, HighPerformanceMode ]
213+
cluster1: [ ScalableSingleNodeMode ]
223214
cluster2: [ ScalableSingleNodeMode ]
224215
os: [ ubuntu-latest ]
225216
runs-on: ${{ matrix.os }}

example/mqtt-customize/src/main/java/org/apache/iotdb/mqtt/server/CustomizedJsonPayloadFormatter.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.apache.iotdb.db.protocol.mqtt.PayloadFormatter;
2424

2525
import io.netty.buffer.ByteBuf;
26+
import org.apache.commons.lang3.NotImplementedException;
2627

2728
import java.util.ArrayList;
2829
import java.util.Arrays;
@@ -32,7 +33,7 @@
3233
public class CustomizedJsonPayloadFormatter implements PayloadFormatter {
3334

3435
@Override
35-
public List<Message> format(ByteBuf payload) {
36+
public List<Message> format(String topic, ByteBuf payload) {
3637
// Suppose the payload is a json format
3738
if (payload == null) {
3839
return Collections.emptyList();
@@ -53,6 +54,12 @@ public List<Message> format(ByteBuf payload) {
5354
return ret;
5455
}
5556

57+
@Override
58+
@Deprecated
59+
public List<Message> format(ByteBuf payload) {
60+
throw new NotImplementedException();
61+
}
62+
5663
@Override
5764
public String getName() {
5865
// set the value of mqtt_payload_formatter in iotdb-common.properties as the following string:

integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppCommonConfig.java

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,12 @@ public CommonConfig setSeriesSlotNum(int seriesSlotNum) {
363363
return this;
364364
}
365365

366+
@Override
367+
public CommonConfig setDataPartitionAllocationStrategy(String dataPartitionAllocationStrategy) {
368+
setProperty("data_partition_allocation_strategy", dataPartitionAllocationStrategy);
369+
return this;
370+
}
371+
366372
@Override
367373
public CommonConfig setSeriesPartitionExecutorClass(String seriesPartitionExecutorClass) {
368374
setProperty("series_partition_executor_class", seriesPartitionExecutorClass);
@@ -429,6 +435,18 @@ public CommonConfig setSchemaRegionPerDataNode(double schemaRegionPerDataNode) {
429435
return this;
430436
}
431437

438+
@Override
439+
public CommonConfig setPipeMemoryManagementEnabled(boolean pipeMemoryManagementEnabled) {
440+
setProperty("pipe_memory_management_enabled", String.valueOf(pipeMemoryManagementEnabled));
441+
return this;
442+
}
443+
444+
@Override
445+
public CommonConfig setIsPipeEnableMemoryCheck(boolean isPipeEnableMemoryCheck) {
446+
setProperty("pipe_enable_memory_checked", String.valueOf(isPipeEnableMemoryCheck));
447+
return this;
448+
}
449+
432450
@Override
433451
public CommonConfig setPipeAirGapReceiverEnabled(boolean isPipeAirGapReceiverEnabled) {
434452
setProperty("pipe_air_gap_receiver_enabled", String.valueOf(isPipeAirGapReceiverEnabled));
@@ -502,12 +520,41 @@ public CommonConfig setQueryMemoryProportion(String queryMemoryProportion) {
502520
return this;
503521
}
504522

523+
@Override
524+
public CommonConfig setSubscriptionPrefetchTsFileBatchMaxDelayInMs(
525+
int subscriptionPrefetchTsFileBatchMaxDelayInMs) {
526+
setProperty(
527+
"subscription_prefetch_ts_file_batch_max_delay_in_ms",
528+
String.valueOf(subscriptionPrefetchTsFileBatchMaxDelayInMs));
529+
return this;
530+
}
531+
532+
@Override
533+
public CommonConfig setSubscriptionPrefetchTsFileBatchMaxSizeInBytes(
534+
int subscriptionPrefetchTsFileBatchMaxSizeInBytes) {
535+
setProperty(
536+
"subscription_prefetch_ts_file_batch_max_size_in_bytes",
537+
String.valueOf(subscriptionPrefetchTsFileBatchMaxSizeInBytes));
538+
return this;
539+
}
540+
541+
public CommonConfig setSubscriptionEnabled(boolean subscriptionEnabled) {
542+
setProperty("subscription_enabled", String.valueOf(subscriptionEnabled));
543+
return this;
544+
}
545+
505546
@Override
506547
public CommonConfig setDefaultStorageGroupLevel(int defaultStorageGroupLevel) {
507548
setProperty("default_storage_group_level", String.valueOf(defaultStorageGroupLevel));
508549
return this;
509550
}
510551

552+
@Override
553+
public CommonConfig setDatanodeMemoryProportion(String datanodeMemoryProportion) {
554+
setProperty("datanode_memory_proportion", datanodeMemoryProportion);
555+
return this;
556+
}
557+
511558
// For part of the log directory
512559
public String getClusterConfigStr() {
513560
return fromConsensusFullNameToAbbr(properties.getProperty(CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS))

integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppSharedCommonConfig.java

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@ public CommonConfig setSeriesSlotNum(int seriesSlotNum) {
361361
return this;
362362
}
363363

364+
@Override
365+
public CommonConfig setDataPartitionAllocationStrategy(String dataPartitionAllocationStrategy) {
366+
cnConfig.setDataPartitionAllocationStrategy(dataPartitionAllocationStrategy);
367+
return this;
368+
}
369+
364370
@Override
365371
public CommonConfig setSeriesPartitionExecutorClass(String seriesPartitionExecutorClass) {
366372
cnConfig.setSeriesPartitionExecutorClass(seriesPartitionExecutorClass);
@@ -438,6 +444,20 @@ public CommonConfig setSchemaRegionPerDataNode(double schemaRegionPerDataNode) {
438444
return this;
439445
}
440446

447+
@Override
448+
public CommonConfig setPipeMemoryManagementEnabled(boolean pipeMemoryManagementEnabled) {
449+
dnConfig.setPipeMemoryManagementEnabled(pipeMemoryManagementEnabled);
450+
cnConfig.setPipeMemoryManagementEnabled(pipeMemoryManagementEnabled);
451+
return this;
452+
}
453+
454+
@Override
455+
public CommonConfig setIsPipeEnableMemoryCheck(boolean isPipeEnableMemoryCheck) {
456+
dnConfig.setIsPipeEnableMemoryCheck(isPipeEnableMemoryCheck);
457+
cnConfig.setIsPipeEnableMemoryCheck(isPipeEnableMemoryCheck);
458+
return this;
459+
}
460+
441461
@Override
442462
public CommonConfig setPipeAirGapReceiverEnabled(boolean isPipeAirGapReceiverEnabled) {
443463
dnConfig.setPipeAirGapReceiverEnabled(isPipeAirGapReceiverEnabled);
@@ -513,10 +533,42 @@ public CommonConfig setQueryMemoryProportion(String queryMemoryProportion) {
513533
return this;
514534
}
515535

536+
@Override
537+
public CommonConfig setSubscriptionPrefetchTsFileBatchMaxDelayInMs(
538+
int subscriptionPrefetchTsFileBatchMaxDelayInMs) {
539+
dnConfig.setSubscriptionPrefetchTsFileBatchMaxDelayInMs(
540+
subscriptionPrefetchTsFileBatchMaxDelayInMs);
541+
cnConfig.setSubscriptionPrefetchTsFileBatchMaxDelayInMs(
542+
subscriptionPrefetchTsFileBatchMaxDelayInMs);
543+
return this;
544+
}
545+
546+
@Override
547+
public CommonConfig setSubscriptionPrefetchTsFileBatchMaxSizeInBytes(
548+
int subscriptionPrefetchTsFileBatchMaxSizeInBytes) {
549+
dnConfig.setSubscriptionPrefetchTsFileBatchMaxSizeInBytes(
550+
subscriptionPrefetchTsFileBatchMaxSizeInBytes);
551+
cnConfig.setSubscriptionPrefetchTsFileBatchMaxSizeInBytes(
552+
subscriptionPrefetchTsFileBatchMaxSizeInBytes);
553+
return this;
554+
}
555+
556+
public CommonConfig setSubscriptionEnabled(boolean subscriptionEnabled) {
557+
dnConfig.setSubscriptionEnabled(subscriptionEnabled);
558+
cnConfig.setSubscriptionEnabled(subscriptionEnabled);
559+
return this;
560+
}
561+
516562
@Override
517563
public CommonConfig setDefaultStorageGroupLevel(int defaultStorageGroupLevel) {
518564
dnConfig.setDefaultStorageGroupLevel(defaultStorageGroupLevel);
519565
cnConfig.setDefaultStorageGroupLevel(defaultStorageGroupLevel);
520566
return this;
521567
}
568+
569+
public CommonConfig setDatanodeMemoryProportion(String datanodeMemoryProportion) {
570+
dnConfig.setDatanodeMemoryProportion(datanodeMemoryProportion);
571+
cnConfig.setDatanodeMemoryProportion(datanodeMemoryProportion);
572+
return this;
573+
}
522574
}

integration-test/src/main/java/org/apache/iotdb/it/env/remote/config/RemoteCommonConfig.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ public CommonConfig setSeriesSlotNum(int seriesSlotNum) {
254254
return this;
255255
}
256256

257+
@Override
258+
public CommonConfig setDataPartitionAllocationStrategy(String dataPartitionAllocationStrategy) {
259+
return this;
260+
}
261+
257262
@Override
258263
public CommonConfig setSeriesPartitionExecutorClass(String seriesPartitionExecutorClass) {
259264
return this;
@@ -308,6 +313,16 @@ public CommonConfig setSchemaRegionPerDataNode(double schemaRegionPerDataNode) {
308313
return this;
309314
}
310315

316+
@Override
317+
public CommonConfig setPipeMemoryManagementEnabled(boolean pipeMemoryManagementEnabled) {
318+
return this;
319+
}
320+
321+
@Override
322+
public CommonConfig setIsPipeEnableMemoryCheck(boolean isPipeEnableMemoryCheck) {
323+
return this;
324+
}
325+
311326
@Override
312327
public CommonConfig setPipeAirGapReceiverEnabled(boolean isPipeAirGapReceiverEnabled) {
313328
return this;
@@ -360,4 +375,25 @@ public CommonConfig setPipeConnectorRequestSliceThresholdBytes(
360375
public CommonConfig setQueryMemoryProportion(String queryMemoryProportion) {
361376
return this;
362377
}
378+
379+
@Override
380+
public CommonConfig setSubscriptionPrefetchTsFileBatchMaxDelayInMs(
381+
int subscriptionPrefetchTsFileBatchMaxDelayInMs) {
382+
return this;
383+
}
384+
385+
@Override
386+
public CommonConfig setSubscriptionPrefetchTsFileBatchMaxSizeInBytes(
387+
int subscriptionPrefetchTsFileBatchMaxSizeInBytes) {
388+
return this;
389+
}
390+
391+
public CommonConfig setSubscriptionEnabled(boolean subscriptionEnabled) {
392+
return this;
393+
}
394+
395+
@Override
396+
public CommonConfig setDatanodeMemoryProportion(String datanodeMemoryProportion) {
397+
return this;
398+
}
363399
}

integration-test/src/main/java/org/apache/iotdb/it/utils/TsFileGenerator.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package org.apache.iotdb.it.utils;
2121

22+
import org.apache.iotdb.commons.conf.IoTDBConstant;
2223
import org.apache.iotdb.commons.exception.IllegalPathException;
2324
import org.apache.iotdb.commons.path.PartialPath;
2425
import org.apache.iotdb.db.storageengine.dataregion.modification.Deletion;
@@ -248,6 +249,36 @@ private void generateTEXT(final Object obj, final int row) {
248249
new Binary(String.format("test point %d", random.nextInt()), TSFileConfig.STRING_CHARSET);
249250
}
250251

252+
public void generateDeletion(final String device) throws IOException, IllegalPathException {
253+
try (final ModificationFile modificationFile =
254+
new ModificationFile(tsFile.getAbsolutePath() + ModificationFile.FILE_SUFFIX)) {
255+
modificationFile.write(
256+
new Deletion(
257+
new PartialPath(
258+
device + TsFileConstant.PATH_SEPARATOR + IoTDBConstant.ONE_LEVEL_PATH_WILDCARD),
259+
tsFile.length(),
260+
Long.MIN_VALUE,
261+
Long.MAX_VALUE));
262+
device2TimeSet.remove(device);
263+
device2MeasurementSchema.remove(device);
264+
}
265+
}
266+
267+
public void generateDeletion(final String device, final MeasurementSchema measurement)
268+
throws IOException, IllegalPathException {
269+
try (final ModificationFile modificationFile =
270+
new ModificationFile(tsFile.getAbsolutePath() + ModificationFile.FILE_SUFFIX)) {
271+
modificationFile.write(
272+
new Deletion(
273+
new PartialPath(
274+
device + TsFileConstant.PATH_SEPARATOR + measurement.getMeasurementId()),
275+
tsFile.length(),
276+
Long.MIN_VALUE,
277+
Long.MAX_VALUE));
278+
device2MeasurementSchema.get(device).remove(measurement);
279+
}
280+
}
281+
251282
public void generateDeletion(final String device, final int number)
252283
throws IOException, IllegalPathException {
253284
try (final ModificationFile modificationFile =

integration-test/src/main/java/org/apache/iotdb/itbase/env/CommonConfig.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ CommonConfig setEnableAutoLeaderBalanceForIoTConsensus(
116116

117117
CommonConfig setSeriesSlotNum(int seriesSlotNum);
118118

119+
CommonConfig setDataPartitionAllocationStrategy(String dataPartitionAllocationStrategy);
120+
119121
CommonConfig setSeriesPartitionExecutorClass(String seriesPartitionExecutorClass);
120122

121123
CommonConfig setSchemaMemoryAllocate(String schemaMemoryAllocate);
@@ -138,6 +140,10 @@ CommonConfig setEnableAutoLeaderBalanceForIoTConsensus(
138140

139141
CommonConfig setSchemaRegionPerDataNode(double schemaRegionPerDataNode);
140142

143+
CommonConfig setPipeMemoryManagementEnabled(boolean pipeMemoryManagementEnabled);
144+
145+
CommonConfig setIsPipeEnableMemoryCheck(boolean isPipeEnableMemoryCheck);
146+
141147
CommonConfig setPipeAirGapReceiverEnabled(boolean isPipeAirGapReceiverEnabled);
142148

143149
CommonConfig setDriverTaskExecutionTimeSliceInMs(long driverTaskExecutionTimeSliceInMs);
@@ -160,7 +166,17 @@ CommonConfig setPipeConnectorRequestSliceThresholdBytes(
160166

161167
CommonConfig setQueryMemoryProportion(String queryMemoryProportion);
162168

169+
CommonConfig setSubscriptionPrefetchTsFileBatchMaxDelayInMs(
170+
int subscriptionPrefetchTsFileBatchMaxDelayInMs);
171+
172+
CommonConfig setSubscriptionPrefetchTsFileBatchMaxSizeInBytes(
173+
int subscriptionPrefetchTsFileBatchMaxSizeInBytes);
174+
175+
CommonConfig setSubscriptionEnabled(boolean subscriptionEnabled);
176+
163177
default CommonConfig setDefaultStorageGroupLevel(int defaultStorageGroupLevel) {
164178
return this;
165179
}
180+
181+
CommonConfig setDatanodeMemoryProportion(String datanodeMemoryProportion);
166182
}

0 commit comments

Comments
 (0)