Skip to content

Commit 4c037e7

Browse files
authored
Pipe: Fixed the bug that mark-as-pipe-request may not be of use in configNode events (apache#16581)
1 parent 2c6e5b8 commit 4c037e7

20 files changed

+334
-45
lines changed

.github/workflows/pipe-it.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,3 +890,89 @@ jobs:
890890
name: cluster-log-dual-table-manual-enhanced-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster }}-${{ matrix.cluster }}
891891
path: integration-test/target/cluster-logs
892892
retention-days: 30
893+
triple:
894+
strategy:
895+
fail-fast: false
896+
max-parallel: 1
897+
matrix:
898+
java: [ 17 ]
899+
cluster1: [ ScalableSingleNodeMode ]
900+
cluster2: [ ScalableSingleNodeMode ]
901+
cluster3: [ ScalableSingleNodeMode ]
902+
os: [ ubuntu-latest ]
903+
runs-on: ${{ matrix.os }}
904+
steps:
905+
- uses: actions/checkout@v4
906+
- name: Set up JDK ${{ matrix.java }}
907+
uses: actions/setup-java@v4
908+
with:
909+
distribution: oracle
910+
java-version: ${{ matrix.java }}
911+
env:
912+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
913+
- name: Cache Maven packages
914+
uses: actions/cache@v4
915+
with:
916+
path: ~/.m2
917+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
918+
restore-keys: ${{ runner.os }}-m2-
919+
- name: Sleep for a random duration between 0 and 10000 milliseconds
920+
run: |
921+
sleep $(( $(( RANDOM % 10000 + 1 )) / 1000))
922+
- name: IT Test
923+
shell: bash
924+
# we do not compile client-cpp for saving time, it is tested in client.yml
925+
# we can skip influxdb-protocol because it has been tested separately in influxdb-protocol.yml
926+
run: |
927+
retry() {
928+
local -i max_attempts=3
929+
local -i attempt=1
930+
local -i retry_sleep=5
931+
local test_output
932+
933+
while [ $attempt -le $max_attempts ]; do
934+
mvn clean verify \
935+
-P with-integration-tests \
936+
-DskipUTs \
937+
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
938+
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }},${{ matrix.cluster3 }} \
939+
-pl integration-test \
940+
-am -PMultiClusterIT3 \
941+
-ntp >> ~/run-tests-$attempt.log && return 0
942+
test_output=$(cat ~/run-tests-$attempt.log)
943+
944+
echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
945+
echo "$test_output"
946+
echo "==================== END: ~/run-tests-$attempt.log ======================"
947+
948+
if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
949+
echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
950+
fi
951+
952+
if echo "$test_output" | grep -q "Could not transfer artifact"; then
953+
if [ $attempt -lt $max_attempts ]; then
954+
echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
955+
sleep $retry_sleep
956+
attempt=$((attempt + 1))
957+
else
958+
echo "Test failed after $max_attempts attempts due to artifact transfer issue."
959+
echo "Treating this as a success because the issue is likely transient."
960+
return 0
961+
fi
962+
elif [ $? -ne 0 ]; then
963+
echo "Test failed with a different error."
964+
return 1
965+
else
966+
echo "Tests passed"
967+
return 0
968+
fi
969+
done
970+
}
971+
retry
972+
- name: Upload Artifact
973+
if: failure()
974+
uses: actions/upload-artifact@v4
975+
with:
976+
name: cluster-log-triple-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster1 }}-${{ matrix.cluster2 }}-${{ matrix.cluster3 }}
977+
path: integration-test/target/cluster-logs
978+
retention-days: 30

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/AbstractPipeTableModelDualManualIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public void setUp() {
4242
}
4343

4444
protected void setupConfig() {
45-
// TODO: delete ratis configurations
4645
senderEnv
4746
.getConfig()
4847
.getCommonConfig()

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/basic/IoTDBPipePermissionIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public void setUp() {
6161
senderEnv = MultiEnvFactory.getEnv(0);
6262
receiverEnv = MultiEnvFactory.getEnv(1);
6363

64-
// TODO: delete ratis configurations
6564
senderEnv
6665
.getConfig()
6766
.getCommonConfig()

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/basic/IoTDBPipeProtocolIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ private void innerSetUp(
6767
schemaRegionReplicationFactor = Math.min(schemaRegionReplicationFactor, dataNodesNum);
6868
dataRegionReplicationFactor = Math.min(dataRegionReplicationFactor, dataNodesNum);
6969

70-
// TODO: delete ratis configurations
7170
senderEnv
7271
.getConfig()
7372
.getCommonConfig()

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/basic/IoTDBPipeSourceIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public void setUp() {
6161
senderEnv = MultiEnvFactory.getEnv(0);
6262
receiverEnv = MultiEnvFactory.getEnv(1);
6363

64-
// TODO: delete ratis configurations
6564
senderEnv
6665
.getConfig()
6766
.getCommonConfig()

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/basic/IoTDBPipeWithLoadIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public void setUp() {
5959
senderEnv = MultiEnvFactory.getEnv(0);
6060
receiverEnv = MultiEnvFactory.getEnv(1);
6161

62-
// TODO: delete ratis configurations
6362
senderEnv
6463
.getConfig()
6564
.getCommonConfig()

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/enhanced/IoTDBPipeAutoConflictIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public void setUp() {
5555
senderEnv = MultiEnvFactory.getEnv(0);
5656
receiverEnv = MultiEnvFactory.getEnv(1);
5757

58-
// TODO: delete ratis configurations
5958
senderEnv
6059
.getConfig()
6160
.getCommonConfig()

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/AbstractPipeDualTreeModelAutoIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public void setUp() {
5050
}
5151

5252
protected void setupConfig() {
53-
// TODO: delete ratis configurations
5453
senderEnv
5554
.getConfig()
5655
.getCommonConfig()

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/basic/IoTDBPipeProcessorIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public void setUp() {
5454
senderEnv = MultiEnvFactory.getEnv(0);
5555
receiverEnv = MultiEnvFactory.getEnv(1);
5656

57-
// TODO: delete ratis configurations
5857
senderEnv
5958
.getConfig()
6059
.getCommonConfig()

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/basic/IoTDBPipeProtocolIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ private void innerSetUp(
6767
schemaRegionReplicationFactor = Math.min(schemaRegionReplicationFactor, dataNodesNum);
6868
dataRegionReplicationFactor = Math.min(dataRegionReplicationFactor, dataNodesNum);
6969

70-
// TODO: delete ratis configurations
7170
senderEnv
7271
.getConfig()
7372
.getCommonConfig()

0 commit comments

Comments
 (0)