-
Notifications
You must be signed in to change notification settings - Fork 1.2k
参考BDBLogStorage 基于ChronicleMap、MapDB、H2MVStore、LevelDB-Java实现的日志存储 #1216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
77331c9
3c12cb7
92dc366
ca6f290
ea79171
ba14494
13f5300
7e3af16
b142feb
70fa0d7
6365b3f
471bbe0
d3a33ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| name: build-macos | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| check_format: | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Check format | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && sh ./tools/check_format.sh | ||
|
|
||
| test_jraft_core: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-core test | ||
| || mvn --projects jraft-core test | ||
| || mvn --projects jraft-core test) | ||
|
Comment on lines
+34
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Switch from chained “||” retries to a proper retry with backoff; also build only required modules. Mirror the Linux suggestions: use a retry step and -pl/-am to avoid building the whole repo per job. - - name: Maven Test
- run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- && (mvn --projects jraft-core test
- || mvn --projects jraft-core test
- || mvn --projects jraft-core test)
+ - name: Maven Test (targeted + retry)
+ shell: bash
+ run: |
+ for i in 1 2 3; do
+ mvn -pl jraft-core -am -Dmaven.javadoc.skip=true -B -V test && break
+ echo "Retry #$i failed; sleeping..." && sleep $((i*10))
+ doneApply for each module section accordingly. Also applies to: 50-53, 66-69, 82-85, 98-101, 114-117, 130-133, 146-149, 162-165 |
||
|
|
||
| test_rheakv_core: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-rheakv/rheakv-core test | ||
| || mvn --projects jraft-rheakv/rheakv-core test | ||
| || mvn --projects jraft-rheakv/rheakv-core test) | ||
|
|
||
| test_rheakv_pd: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-rheakv/rheakv-pd test | ||
| || mvn --projects jraft-rheakv/rheakv-pd test | ||
| || mvn --projects jraft-rheakv/rheakv-pd test) | ||
|
|
||
| test_rpc_grpc_impl: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-extension/rpc-grpc-impl test | ||
| || mvn --projects jraft-extension/rpc-grpc-impl test | ||
| || mvn --projects jraft-extension/rpc-grpc-impl test) | ||
|
|
||
| test_leveldb_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-extension/leveldb-log-storage-impl test | ||
| || mvn --projects jraft-extension/leveldb-log-storage-impl test | ||
| || mvn --projects jraft-extension/leveldb-log-storage-impl test) | ||
|
|
||
| test_h2mvstore_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-extension/h2mvstore-log-storage-impl test | ||
| || mvn --projects jraft-extension/h2mvstore-log-storage-impl test | ||
| || mvn --projects jraft-extension/h2mvstore-log-storage-impl test) | ||
|
|
||
| test_mapdb_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-extension/mapdb-log-storage-impl test | ||
| || mvn --projects jraft-extension/mapdb-log-storage-impl test | ||
| || mvn --projects jraft-extension/mapdb-log-storage-impl test) | ||
|
|
||
| test_chroniclemap_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 8 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 8 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-extension/chronicle-map-log-storage-impl test | ||
| || mvn --projects jraft-extension/chronicle-map-log-storage-impl test | ||
| || mvn --projects jraft-extension/chronicle-map-log-storage-impl test) | ||
|
|
||
| test_bdb_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| && (mvn --projects jraft-extension/bdb-log-storage-impl test | ||
| || mvn --projects jraft-extension/bdb-log-storage-impl test | ||
| || mvn --projects jraft-extension/bdb-log-storage-impl test) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,185 @@ | ||
| name: build-windows | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| check_format: | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Check format | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| sh ./tools/check_format.sh | ||
|
|
||
| test_jraft_core: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-core test \ | ||
| || mvn --projects jraft-core test \ | ||
| || mvn --projects jraft-core test) | ||
|
|
||
| test_rheakv_core: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-rheakv/rheakv-core test \ | ||
| || mvn --projects jraft-rheakv/rheakv-core test \ | ||
| || mvn --projects jraft-rheakv/rheakv-core test) | ||
|
|
||
| test_rheakv_pd: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-rheakv/rheakv-pd test \ | ||
| || mvn --projects jraft-rheakv/rheakv-pd test \ | ||
| || mvn --projects jraft-rheakv/rheakv-pd test) | ||
|
|
||
| test_rpc_grpc_impl: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-extension/rpc-grpc-impl test \ | ||
| || mvn --projects jraft-extension/rpc-grpc-impl test \ | ||
| || mvn --projects jraft-extension/rpc-grpc-impl test) | ||
|
|
||
| test_leveldb_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-extension/leveldb-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/leveldb-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/leveldb-log-storage-impl test) | ||
|
|
||
| test_h2mvstore_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-extension/h2mvstore-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/h2mvstore-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/h2mvstore-log-storage-impl test) | ||
|
|
||
| test_mapdb_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-extension/mapdb-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/mapdb-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/mapdb-log-storage-impl test) | ||
|
|
||
| test_chroniclemap_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 8 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 8 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-extension/chronicle-map-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/chronicle-map-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/chronicle-map-log-storage-impl test) | ||
|
|
||
| test_bdb_log_storage_impl: | ||
| needs: check_format | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Maven Test | ||
| shell: bash | ||
| run: | | ||
| mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| (mvn --projects jraft-extension/bdb-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/bdb-log-storage-impl test \ | ||
| || mvn --projects jraft-extension/bdb-log-storage-impl test) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enable Maven cache on macOS jobs too.
Same rationale as Linux: add cache: maven to all setup-java steps.
Also applies to: 27-32, 43-48, 59-64, 75-80, 91-96, 107-112, 123-128, 139-144, 155-160
🤖 Prompt for AI Agents