Skip to content

Commit d65dcc6

Browse files
committed
Merge remote-tracking branch 'iotdb/master' into feature/iotconsensus-snap-multi-dir
# Conflicts: # iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/builder/PipeTsFileBuilder.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SizeTieredCompactionSelector.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/SnapshotLoader.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/generator/TsFileNameGenerator.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/allocation/AbstractNodeAllocationStrategy.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/util/LoadUtil.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/TierManager.java # iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/IoTDBSnapshotTest.java # iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/disk/FolderManager.java # iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/disk/strategy/DirectoryStrategy.java # iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/disk/strategy/MinFolderOccupiedSpaceFirstStrategy.java
2 parents de6b65d + d9fdf0c commit d65dcc6

4,905 files changed

Lines changed: 259712 additions & 98431 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.

.clang-format

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
---
19+
BasedOnStyle: LLVM
20+
IndentWidth: 2
21+
TabWidth: 2
22+
UseTab: Never
23+
ColumnLimit: 100
24+
BreakBeforeBraces: Attach
25+
AllowShortIfStatementsOnASingleLine: false
26+
AllowShortFunctionsOnASingleLine: Empty
27+
PointerAlignment: Left
28+
DerivePointerAlignment: false
29+
SortIncludes: false
30+
ReflowComments: false
31+
Standard: c++11
32+
...

.claude/settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "Write|Edit",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "jq -r '.tool_input.file_path // .tool_response.filePath' | { read -r f; echo \"$f\" | grep -q '\\.java$' && mvn spotless:apply -f \"$(git rev-parse --show-toplevel)/pom.xml\" -DspotlessFiles=\"$(echo \"$f\" | sed 's/[.[\\\\/^$|?*+(){}]/\\\\&/g')\" -q || true; }",
10+
"timeout": 30,
11+
"statusMessage": "Running spotless format..."
12+
}
13+
]
14+
}
15+
]
16+
}
17+
}

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@
2020
*
2121
!distribution
2222
!docker/src/main/DockerCompose/start-1c1d.sh
23+
!docker/src/main/ainode-build-data/
24+
!docker/src/main/ainode-entrypoint.sh
Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
# Manual run; Release published; v* tag pushes; rc/** pushes only when C++-related paths change
2+
# (job should-package). release events use the workflow file from the default branch.
3+
name: C++ Client package
4+
5+
on:
6+
workflow_dispatch:
7+
release:
8+
types: [published]
9+
push:
10+
branches:
11+
- "rc/**"
12+
tags:
13+
- "v*"
14+
15+
concurrency:
16+
group: client-cpp-package-${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
env:
20+
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
21+
MAVEN_ARGS: --batch-mode --no-transfer-progress
22+
23+
jobs:
24+
should-package:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
run: ${{ steps.result.outputs.run }}
28+
steps:
29+
- uses: actions/checkout@v5
30+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/rc/')
31+
- uses: dorny/paths-filter@v3
32+
id: filter
33+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/rc/')
34+
with:
35+
filters: |
36+
cpp:
37+
- 'pom.xml'
38+
- 'iotdb-client/**'
39+
- 'iotdb-protocol/**'
40+
- '.github/workflows/client-cpp-package.yml'
41+
- id: result
42+
shell: bash
43+
run: |
44+
set -euo pipefail
45+
E="${{ github.event_name }}"
46+
R="${{ github.ref }}"
47+
if [[ "$E" == "workflow_dispatch" ]] || [[ "$E" == "release" ]]; then
48+
echo "run=true" >> "$GITHUB_OUTPUT"
49+
exit 0
50+
fi
51+
if [[ "$E" == "push" ]] && [[ "$R" == refs/tags/v* ]]; then
52+
echo "run=true" >> "$GITHUB_OUTPUT"
53+
exit 0
54+
fi
55+
if [[ "$E" == "push" ]] && [[ "$R" =~ ^refs/heads/rc/ ]]; then
56+
if [[ "${{ steps.filter.outputs.cpp }}" == "true" ]]; then
57+
echo "run=true" >> "$GITHUB_OUTPUT"
58+
else
59+
echo "run=false" >> "$GITHUB_OUTPUT"
60+
fi
61+
exit 0
62+
fi
63+
echo "run=false" >> "$GITHUB_OUTPUT"
64+
65+
package-linux:
66+
name: Package (${{ matrix.name }})
67+
needs: should-package
68+
if: needs.should-package.outputs.run == 'true'
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
include:
73+
- name: linux-x86_64
74+
runs-on: ubuntu-22.04
75+
- name: linux-aarch64
76+
runs-on: ubuntu-22.04-arm
77+
runs-on: ${{ matrix.runs-on }}
78+
steps:
79+
- uses: actions/checkout@v5
80+
- name: Set up JDK 17
81+
uses: actions/setup-java@v5
82+
with:
83+
distribution: temurin
84+
java-version: "17"
85+
- name: Install C++ dependencies (Linux)
86+
shell: bash
87+
run: |
88+
set -euxo pipefail
89+
sudo apt-get update
90+
sudo apt-get install -y libboost-all-dev openssl libssl-dev wget
91+
. /etc/os-release
92+
if [[ "${VERSION_CODENAME}" == "jammy" ]]; then
93+
wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
94+
chmod +x /tmp/llvm.sh
95+
sudo DEBIAN_FRONTEND=noninteractive /tmp/llvm.sh 17
96+
# llvm.sh installs clang-17/lldb/lld/clangd but not the clang-format-17 package
97+
sudo apt-get install -y clang-format-17
98+
else
99+
sudo apt-get install -y clang-format-17
100+
fi
101+
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-17 100
102+
sudo update-alternatives --set clang-format /usr/bin/clang-format-17
103+
clang-format --version
104+
- name: Cache Maven packages
105+
uses: actions/cache@v5
106+
with:
107+
path: ~/.m2
108+
key: ${{ runner.os }}-${{ runner.arch }}-m2-${{ hashFiles('**/pom.xml') }}
109+
restore-keys: |
110+
${{ runner.os }}-${{ runner.arch }}-m2-
111+
- name: Package client-cpp
112+
shell: bash
113+
run: |
114+
set -euxo pipefail
115+
./mvnw clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests
116+
- name: Upload zip artifact
117+
uses: actions/upload-artifact@v6
118+
with:
119+
name: client-cpp-${{ matrix.name }}
120+
path: iotdb-client/client-cpp/target/client-cpp-*-cpp-*.zip
121+
if-no-files-found: error
122+
123+
package-macos:
124+
name: Package (${{ matrix.name }})
125+
needs: should-package
126+
if: needs.should-package.outputs.run == 'true'
127+
strategy:
128+
fail-fast: false
129+
matrix:
130+
include:
131+
- name: macos-x86_64
132+
runs-on: macos-15-intel
133+
- name: macos-arm64
134+
runs-on: macos-latest
135+
runs-on: ${{ matrix.runs-on }}
136+
steps:
137+
- uses: actions/checkout@v5
138+
- name: Set up JDK 17
139+
uses: actions/setup-java@v5
140+
with:
141+
distribution: temurin
142+
java-version: "17"
143+
- name: Install C++ dependencies (macOS)
144+
shell: bash
145+
run: |
146+
set -euxo pipefail
147+
brew install boost openssl llvm@17
148+
ln -sf "$(brew --prefix llvm@17)/bin/clang-format" "$(brew --prefix)/bin/clang-format"
149+
echo "$(brew --prefix llvm@17)/bin" >> "$GITHUB_PATH"
150+
clang-format --version
151+
- name: Cache Maven packages
152+
uses: actions/cache@v5
153+
with:
154+
path: ~/.m2
155+
key: ${{ runner.os }}-${{ runner.arch }}-m2-${{ hashFiles('**/pom.xml') }}
156+
restore-keys: |
157+
${{ runner.os }}-${{ runner.arch }}-m2-
158+
- name: Package client-cpp
159+
shell: bash
160+
env:
161+
MACOSX_DEPLOYMENT_TARGET: "12.0"
162+
run: |
163+
set -euxo pipefail
164+
./mvnw clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests
165+
- name: Upload zip artifact
166+
uses: actions/upload-artifact@v6
167+
with:
168+
name: client-cpp-${{ matrix.name }}
169+
path: iotdb-client/client-cpp/target/client-cpp-*-cpp-*.zip
170+
if-no-files-found: error
171+
172+
package-windows:
173+
name: Package (${{ matrix.name }})
174+
needs: should-package
175+
if: needs.should-package.outputs.run == 'true'
176+
strategy:
177+
fail-fast: false
178+
matrix:
179+
include:
180+
- name: windows-vs2022
181+
runs-on: windows-2022
182+
boost_choco: boost-msvc-14.3
183+
cmake_generator: ""
184+
iotdb_tools_thrift_version: ""
185+
- name: windows-vs2026
186+
runs-on: windows-2025-vs2026
187+
boost_choco: boost-msvc-14.3
188+
cmake_generator: Visual Studio 18 2026
189+
iotdb_tools_thrift_version: ""
190+
runs-on: ${{ matrix.runs-on }}
191+
steps:
192+
- uses: actions/checkout@v5
193+
- name: Set up JDK 17
194+
uses: actions/setup-java@v5
195+
with:
196+
distribution: temurin
197+
java-version: "17"
198+
- name: Install C++ dependencies (Windows)
199+
shell: pwsh
200+
run: |
201+
choco install winflexbison3 -y
202+
choco install ${{ matrix.boost_choco }} -y
203+
$boost_path = (Get-ChildItem -Path 'C:\local\' -Filter 'boost_*').FullName
204+
echo $boost_path >> $env:GITHUB_PATH
205+
choco install openssl -y
206+
$sslPath = (Get-ChildItem 'C:\Program Files\OpenSSL*' -Directory | Select-Object -First 1).FullName
207+
echo "$sslPath\bin" >> $env:GITHUB_PATH
208+
echo "OPENSSL_ROOT_DIR=$sslPath" >> $env:GITHUB_ENV
209+
choco install llvm --version=17.0.6 --force -y
210+
clang-format --version
211+
- name: Cache Maven packages
212+
uses: actions/cache@v5
213+
with:
214+
path: ~/.m2
215+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
216+
restore-keys: |
217+
${{ runner.os }}-m2-
218+
- name: Package client-cpp
219+
shell: bash
220+
env:
221+
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
222+
IOTDB_TOOLS_THRIFT_VERSION: ${{ matrix.iotdb_tools_thrift_version }}
223+
run: |
224+
set -euxo pipefail
225+
MVN_ARGS=(./mvnw clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests)
226+
if [ -n "${CMAKE_GENERATOR:-}" ]; then
227+
MVN_ARGS+=("-Dcmake.generator=${CMAKE_GENERATOR}")
228+
fi
229+
if [ -n "${IOTDB_TOOLS_THRIFT_VERSION:-}" ]; then
230+
MVN_ARGS+=("-Diotdb-tools-thrift.version=${IOTDB_TOOLS_THRIFT_VERSION}")
231+
fi
232+
"${MVN_ARGS[@]}"
233+
- name: Upload zip artifact
234+
uses: actions/upload-artifact@v6
235+
with:
236+
name: client-cpp-${{ matrix.name }}
237+
path: iotdb-client/client-cpp/target/client-cpp-*-cpp-*.zip
238+
if-no-files-found: error

0 commit comments

Comments
 (0)