Skip to content

Commit f65846d

Browse files
committed
Merge remote-tracking branch 'origin/master' into air-gap-udp-transport
# Conflicts: # iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBAirGapSink.java
2 parents 50aa7a8 + 7a23a98 commit f65846d

344 files changed

Lines changed: 12705 additions & 1521 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/client-cpp-package.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,32 @@ jobs:
4646
steps:
4747
- uses: actions/checkout@v5
4848
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/rc/')
49-
- uses: dorny/paths-filter@v3
49+
with:
50+
fetch-depth: 0
51+
- name: Detect C++ package changes
5052
id: filter
5153
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/rc/')
52-
with:
53-
filters: |
54-
cpp:
55-
- 'iotdb-client/client-cpp/**'
56-
- 'iotdb-client/pom.xml'
57-
- 'iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift'
58-
- 'iotdb-protocol/thrift-commons/src/main/thrift/common.thrift'
59-
- '.github/workflows/client-cpp-package.yml'
60-
- '.github/scripts/package-client-cpp-*.sh'
54+
shell: bash
55+
run: |
56+
set -euo pipefail
57+
58+
BASE="${{ github.event.before }}"
59+
HEAD="${{ github.sha }}"
60+
if [[ "$BASE" =~ ^0+$ ]]; then
61+
BASE="$(git hash-object -t tree /dev/null)"
62+
fi
63+
64+
cpp=false
65+
while IFS= read -r file; do
66+
case "$file" in
67+
iotdb-client/client-cpp/*|iotdb-client/pom.xml|iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift|iotdb-protocol/thrift-commons/src/main/thrift/common.thrift|.github/workflows/client-cpp-package.yml|.github/scripts/package-client-cpp-*.sh)
68+
cpp=true
69+
break
70+
;;
71+
esac
72+
done < <(git diff --name-only "$BASE" "$HEAD")
73+
74+
echo "cpp=${cpp}" >> "$GITHUB_OUTPUT"
6175
- id: result
6276
shell: bash
6377
run: |

.github/workflows/multi-language-client.yml

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Shared client CI: run only affected language jobs via paths-filter.
1+
# Shared client CI: run only affected language jobs via changed path detection.
22
name: Multi-Language Client
33
on:
44
push:
@@ -50,36 +50,55 @@ jobs:
5050
go: ${{ steps.filter.outputs.go }}
5151
steps:
5252
- uses: actions/checkout@v5
53-
- uses: dorny/paths-filter@v3
54-
id: filter
5553
with:
56-
filters: |
57-
cpp:
58-
- 'iotdb-client/pom.xml'
59-
- 'iotdb-client/client-cpp/**'
60-
- 'iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift'
61-
- 'iotdb-protocol/thrift-commons/src/main/thrift/common.thrift'
62-
- '.github/workflows/multi-language-client.yml'
63-
- '.github/workflows/client-cpp-package.yml'
64-
- '.github/scripts/package-client-cpp-*.sh'
65-
python:
66-
- 'pom.xml'
67-
- 'iotdb-client/pom.xml'
68-
- 'iotdb-client/client-py/**'
69-
- 'docker/src/main/Dockerfile-1c1d'
70-
- '.github/workflows/multi-language-client.yml'
71-
go:
72-
- 'pom.xml'
73-
- 'iotdb-core/**'
74-
- 'iotdb-api/**'
75-
- 'iotdb-protocol/**'
76-
- 'distribution/**'
77-
- 'integration-test/**'
78-
- 'iotdb-client/session/**'
79-
- 'iotdb-client/jdbc/**'
80-
- 'iotdb-client/cli/**'
81-
- 'iotdb-client/service-rpc/**'
82-
- '.github/workflows/multi-language-client.yml'
54+
fetch-depth: 0
55+
- name: Detect changed client paths
56+
id: filter
57+
shell: bash
58+
run: |
59+
set -euo pipefail
60+
61+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
62+
BASE="${{ github.event.pull_request.base.sha }}"
63+
HEAD="${{ github.sha }}"
64+
elif [[ "${{ github.event_name }}" == "push" ]]; then
65+
BASE="${{ github.event.before }}"
66+
HEAD="${{ github.sha }}"
67+
else
68+
echo "cpp=true" >> "$GITHUB_OUTPUT"
69+
echo "python=true" >> "$GITHUB_OUTPUT"
70+
echo "go=true" >> "$GITHUB_OUTPUT"
71+
exit 0
72+
fi
73+
74+
if [[ "$BASE" =~ ^0+$ ]]; then
75+
BASE="$(git hash-object -t tree /dev/null)"
76+
fi
77+
78+
cpp=false
79+
python=false
80+
go=false
81+
while IFS= read -r file; do
82+
case "$file" in
83+
iotdb-client/pom.xml|iotdb-client/client-cpp/*|iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift|iotdb-protocol/thrift-commons/src/main/thrift/common.thrift|.github/workflows/multi-language-client.yml|.github/workflows/client-cpp-package.yml|.github/scripts/package-client-cpp-*.sh)
84+
cpp=true
85+
;;
86+
esac
87+
case "$file" in
88+
pom.xml|iotdb-client/pom.xml|iotdb-client/client-py/*|docker/src/main/Dockerfile-1c1d|.github/workflows/multi-language-client.yml)
89+
python=true
90+
;;
91+
esac
92+
case "$file" in
93+
pom.xml|iotdb-core/*|iotdb-api/*|iotdb-protocol/*|distribution/*|integration-test/*|iotdb-client/session/*|iotdb-client/jdbc/*|iotdb-client/cli/*|iotdb-client/service-rpc/*|.github/workflows/multi-language-client.yml)
94+
go=true
95+
;;
96+
esac
97+
done < <(git diff --name-only "$BASE" "$HEAD")
98+
99+
echo "cpp=${cpp}" >> "$GITHUB_OUTPUT"
100+
echo "python=${python}" >> "$GITHUB_OUTPUT"
101+
echo "go=${go}" >> "$GITHUB_OUTPUT"
83102
84103
cpp:
85104
needs: changes

.github/workflows/pipe-it.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
mvn clean verify \
8686
-P with-integration-tests \
8787
-DskipUTs \
88+
-DintegrationTest.clusterReadyRetryCount=90 \
8889
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
8990
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }} \
9091
-pl integration-test \
@@ -188,6 +189,7 @@ jobs:
188189
mvn clean verify \
189190
-P with-integration-tests \
190191
-DskipUTs \
192+
-DintegrationTest.clusterReadyRetryCount=90 \
191193
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
192194
-DClusterConfigurations=${{ matrix.cluster }},${{ matrix.cluster }} \
193195
-Dfailsafe.includesFile="$RUNNER_TEMP/it-shard.txt" \
@@ -295,6 +297,7 @@ jobs:
295297
mvn clean verify \
296298
-P with-integration-tests \
297299
-DskipUTs \
300+
-DintegrationTest.clusterReadyRetryCount=90 \
298301
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
299302
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }} \
300303
-Dfailsafe.includesFile="$RUNNER_TEMP/it-shard.txt" \
@@ -402,6 +405,7 @@ jobs:
402405
mvn clean verify \
403406
-P with-integration-tests \
404407
-DskipUTs \
408+
-DintegrationTest.clusterReadyRetryCount=90 \
405409
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
406410
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }} \
407411
-Dfailsafe.includesFile="$RUNNER_TEMP/it-shard.txt" \
@@ -491,6 +495,7 @@ jobs:
491495
mvn clean verify \
492496
-P with-integration-tests \
493497
-DskipUTs \
498+
-DintegrationTest.clusterReadyRetryCount=90 \
494499
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
495500
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }} \
496501
-pl integration-test \
@@ -577,6 +582,7 @@ jobs:
577582
mvn clean verify \
578583
-P with-integration-tests \
579584
-DskipUTs \
585+
-DintegrationTest.clusterReadyRetryCount=90 \
580586
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
581587
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }} \
582588
-pl integration-test \
@@ -663,6 +669,7 @@ jobs:
663669
mvn clean verify \
664670
-P with-integration-tests \
665671
-DskipUTs \
672+
-DintegrationTest.clusterReadyRetryCount=90 \
666673
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
667674
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }} \
668675
-pl integration-test \
@@ -749,6 +756,7 @@ jobs:
749756
mvn clean verify \
750757
-P with-integration-tests \
751758
-DskipUTs \
759+
-DintegrationTest.clusterReadyRetryCount=90 \
752760
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
753761
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }} \
754762
-pl integration-test \
@@ -852,6 +860,7 @@ jobs:
852860
mvn clean verify \
853861
-P with-integration-tests \
854862
-DskipUTs \
863+
-DintegrationTest.clusterReadyRetryCount=90 \
855864
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
856865
-DClusterConfigurations=${{ matrix.cluster }},${{ matrix.cluster }} \
857866
-Dfailsafe.includesFile="$RUNNER_TEMP/it-shard.txt" \
@@ -958,6 +967,7 @@ jobs:
958967
mvn clean verify \
959968
-P with-integration-tests \
960969
-DskipUTs \
970+
-DintegrationTest.clusterReadyRetryCount=90 \
961971
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
962972
-DClusterConfigurations=${{ matrix.cluster }},${{ matrix.cluster }} \
963973
-Dfailsafe.includesFile="$RUNNER_TEMP/it-shard.txt" \
@@ -1047,6 +1057,7 @@ jobs:
10471057
mvn clean verify \
10481058
-P with-integration-tests \
10491059
-DskipUTs \
1060+
-DintegrationTest.clusterReadyRetryCount=90 \
10501061
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
10511062
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }},${{ matrix.cluster3 }} \
10521063
-pl integration-test \

LICENSE-binary

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ org.eclipse.jetty.ee10:jetty-ee10-servlet:12.0.36
241241
org.eclipse.jetty:jetty-util:12.0.36
242242
com.google.code.findbugs:jsr305:3.0.2
243243
com.librato.metrics:librato-java:2.1.0
244-
org.apache.thrift:libthrift:0.14.1
244+
org.apache.thrift:libthrift:0.23.0
245245
io.dropwizard.metrics:metrics-core:4.2.19
246246
io.dropwizard.metrics:metrics-jvm:3.2.2
247247
com.librato.metrics:metrics-librato:5.1.0

external-service-impl/rest/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@
3838
<groupId>org.glassfish.jersey.inject</groupId>
3939
<artifactId>jersey-hk2</artifactId>
4040
<scope>runtime</scope>
41-
<exclusions>
42-
<!-- repeated in node commons -->
43-
<exclusion>
44-
<groupId>jakarta.annotation</groupId>
45-
<artifactId>jakarta.annotation-api</artifactId>
46-
</exclusion>
47-
</exclusions>
4841
</dependency>
4942
<dependency>
5043
<groupId>org.apache.iotdb</groupId>
@@ -87,11 +80,6 @@
8780
<groupId>jakarta.validation</groupId>
8881
<artifactId>jakarta.validation-api</artifactId>
8982
</exclusion>
90-
<!-- repeated in node commons -->
91-
<exclusion>
92-
<groupId>jakarta.annotation</groupId>
93-
<artifactId>jakarta.annotation-api</artifactId>
94-
</exclusion>
9583
</exclusions>
9684
</dependency>
9785
<dependency>

external-service-impl/rest/src/main/java/org/apache/iotdb/rest/RestService.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.apache.iotdb.externalservice.api.IExternalService;
2222
import org.apache.iotdb.rest.i18n.RestMessages;
2323
import org.apache.iotdb.rest.protocol.filter.ApiOriginFilter;
24+
import org.apache.iotdb.rpc.RpcSslUtils;
2425

2526
import org.eclipse.jetty.ee10.servlet.ServletContextHandler;
2627
import org.eclipse.jetty.ee10.servlet.ServletHolder;
@@ -52,6 +53,7 @@ private void startSSL(
5253
String trustStorePath,
5354
String keyStorePwd,
5455
String trustStorePwd,
56+
String sslProtocol,
5557
int idleTime,
5658
boolean clientAuth) {
5759
server = new Server();
@@ -61,6 +63,7 @@ private void startSSL(
6163
httpsConfig.addCustomizer(new SecureRequestCustomizer());
6264

6365
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
66+
configureSSL(sslContextFactory, sslProtocol);
6467
sslContextFactory.setKeyStorePath(keyStorePath);
6568
sslContextFactory.setKeyStorePassword(keyStorePwd);
6669
if (clientAuth) {
@@ -125,6 +128,7 @@ public void start() {
125128
config.getTrustStorePath(),
126129
config.getKeyStorePwd(),
127130
config.getTrustStorePwd(),
131+
config.getSslProtocol(),
128132
config.getIdleTimeoutInSeconds(),
129133
config.isClientAuth());
130134
} else {
@@ -142,4 +146,9 @@ public void stop() {
142146
server.destroy();
143147
}
144148
}
149+
150+
private void configureSSL(SslContextFactory.Server sslContextFactory, String sslProtocol) {
151+
String protocol = RpcSslUtils.normalizeProtocol(sslProtocol);
152+
sslContextFactory.setProtocol(protocol);
153+
}
145154
}

integration-test/src/main/java/org/apache/iotdb/it/env/MultiEnvFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public static BaseEnv getEnv(final int index) throws IndexOutOfBoundsException {
5151
/** Create several environments according to the specific number. */
5252
public static void createEnv(final int num) {
5353
// Not judge EnvType for individual test convenience
54+
envList.clear();
5455
final long startTime = System.currentTimeMillis();
5556
for (int i = 0; i < num; ++i) {
5657
try {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ protected final void setProperty(@NotNull String key, String value) {
120120
}
121121
}
122122

123+
public final String getProperty(@NotNull String key, String defaultValue) {
124+
return properties.getProperty(key, defaultValue);
125+
}
126+
123127
/** Create an instance but with empty properties. */
124128
public abstract MppBaseConfig emptyClone();
125129
}

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,6 @@ public CommonConfig setEnableAutoLeaderBalanceForRatisConsensus(
351351
return this;
352352
}
353353

354-
@Override
355-
public CommonConfig setEnableAutoLeaderBalanceForIoTConsensus(
356-
boolean enableAutoLeaderBalanceForIoTConsensus) {
357-
setProperty(
358-
"enable_auto_leader_balance_for_iot_consensus",
359-
String.valueOf(enableAutoLeaderBalanceForIoTConsensus));
360-
return this;
361-
}
362-
363354
@Override
364355
public CommonConfig setQueryThreadCount(int queryThreadCount) {
365356
if (queryThreadCount <= 0) {
@@ -475,13 +466,13 @@ public CommonConfig setDatabaseLimitThreshold(long databaseLimitThreshold) {
475466
}
476467

477468
@Override
478-
public CommonConfig setDataRegionPerDataNode(double dataRegionPerDataNode) {
469+
public CommonConfig setDataRegionPerDataNode(int dataRegionPerDataNode) {
479470
setProperty("data_region_per_data_node", String.valueOf(dataRegionPerDataNode));
480471
return this;
481472
}
482473

483474
@Override
484-
public CommonConfig setSchemaRegionPerDataNode(double schemaRegionPerDataNode) {
475+
public CommonConfig setSchemaRegionPerDataNode(int schemaRegionPerDataNode) {
485476
setProperty("schema_region_per_data_node", String.valueOf(schemaRegionPerDataNode));
486477
return this;
487478
}
@@ -635,6 +626,12 @@ public CommonConfig setEnforceStrongPassword(boolean enforceStrongPassword) {
635626
return this;
636627
}
637628

629+
@Override
630+
public CommonConfig setEnableThriftClientSSL(boolean enableThriftClientSSL) {
631+
setProperty("enable_thrift_ssl", String.valueOf(enableThriftClientSSL));
632+
return this;
633+
}
634+
638635
@Override
639636
public CommonConfig setEnableInternalSSL(boolean enableInternalSSL) {
640637
setProperty("enable_internal_ssl", String.valueOf(enableInternalSSL));
@@ -665,6 +662,12 @@ public CommonConfig setTrustStorePwd(String trustStorePwd) {
665662
return this;
666663
}
667664

665+
@Override
666+
public CommonConfig setSslProtocol(String sslProtocol) {
667+
setProperty("ssl_protocol", sslProtocol);
668+
return this;
669+
}
670+
668671
@Override
669672
public CommonConfig setDatanodeMemoryProportion(String datanodeMemoryProportion) {
670673
setProperty("datanode_memory_proportion", datanodeMemoryProportion);

0 commit comments

Comments
 (0)