From f33d5d06fa7cf0addfb4357caef9690347e51b85 Mon Sep 17 00:00:00 2001 From: yfeng Date: Sun, 14 Aug 2022 23:59:52 +0800 Subject: [PATCH 01/10] fdb : suport fdb for metadata engine --- .github/actions/clickhouse/action.yml | 6 + .github/actions/fio/action.yml | 9 + .github/actions/gateway/action.yml | 8 + .github/actions/load/action.yml | 6 + .github/actions/rmr/action.yml | 8 + .github/actions/sysbenchrndrw/action.yml | 8 + .github/actions/sysbenchseqrw/action.yml | 6 + .github/actions/vdbench/action.yml | 6 + .github/actions/version-compatible/action.yml | 226 ++++++++++++++++++ .github/workflows/aitests.yml | 5 + .github/workflows/aitests_limitcache.yml | 5 + .github/workflows/config.yml | 5 + .github/workflows/elastictest.yml | 5 + .github/workflows/encoding_mysql.yml | 5 + .github/workflows/format.yml | 5 + .github/workflows/gateway.yml | 8 + .github/workflows/gc.yml | 5 + .github/workflows/integrationtests.yml | 7 + .github/workflows/ltpfs.yml | 5 + .github/workflows/ltpsyscallshead.yml | 7 + .github/workflows/ltpsyscallsmiddle.yml | 5 + .github/workflows/ltpsyscallstail.yml | 5 + .github/workflows/mdtest.yml | 5 + .github/workflows/mongodb_mmap.yml | 5 + .github/workflows/mysqltest_bigtable.yml | 7 + .github/workflows/mysqltest_smalltable.yml | 5 + .github/workflows/pjdfstest.yml | 5 + .github/workflows/redis_compile.yml | 5 + .github/workflows/sdktest.yml | 5 + .github/workflows/sync.yml | 10 + .github/workflows/tpcds.yml | 8 + .github/workflows/unittests.yml | 5 + .github/workflows/verify.yml | 11 + go.mod | 1 + go.sum | 4 + pkg/meta/benchmarks_test.go | 3 +- pkg/meta/tkv_fdb.go | 187 +++++++++++++++ pkg/meta/tkv_test.go | 8 + 38 files changed, 628 insertions(+), 1 deletion(-) create mode 100644 .github/actions/version-compatible/action.yml create mode 100644 pkg/meta/tkv_fdb.go diff --git a/.github/actions/clickhouse/action.yml b/.github/actions/clickhouse/action.yml index f0f37dc2e56b..ca91a41bab1a 100644 --- a/.github/actions/clickhouse/action.yml +++ b/.github/actions/clickhouse/action.yml @@ -26,6 +26,12 @@ runs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target shell: bash run: make juicefs diff --git a/.github/actions/fio/action.yml b/.github/actions/fio/action.yml index fead90b3f5c9..42d9807e8d5d 100644 --- a/.github/actions/fio/action.yml +++ b/.github/actions/fio/action.yml @@ -69,6 +69,7 @@ runs: with: go-version: '1.18.x' +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -78,6 +79,14 @@ runs: restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | make juicefs diff --git a/.github/actions/gateway/action.yml b/.github/actions/gateway/action.yml index e7d2d2b8e9e9..9e356a7cdb78 100644 --- a/.github/actions/gateway/action.yml +++ b/.github/actions/gateway/action.yml @@ -43,6 +43,7 @@ runs: with: go-version: '1.18.x' +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -51,6 +52,13 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | diff --git a/.github/actions/load/action.yml b/.github/actions/load/action.yml index 5bd93178abf5..6401cf5c3ab2 100644 --- a/.github/actions/load/action.yml +++ b/.github/actions/load/action.yml @@ -27,6 +27,12 @@ runs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/actions/rmr/action.yml b/.github/actions/rmr/action.yml index 233554cf3250..0254528e0d01 100644 --- a/.github/actions/rmr/action.yml +++ b/.github/actions/rmr/action.yml @@ -22,6 +22,7 @@ runs: with: go-version: '1.18.x' +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -30,6 +31,13 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | diff --git a/.github/actions/sysbenchrndrw/action.yml b/.github/actions/sysbenchrndrw/action.yml index c811cae555e8..b04992776702 100644 --- a/.github/actions/sysbenchrndrw/action.yml +++ b/.github/actions/sysbenchrndrw/action.yml @@ -17,6 +17,7 @@ runs: - name: Set up Docker uses: docker-practice/actions-setup-docker@master +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -25,6 +26,13 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target shell: bash diff --git a/.github/actions/sysbenchseqrw/action.yml b/.github/actions/sysbenchseqrw/action.yml index 8e149fba2bc8..e780424627fc 100644 --- a/.github/actions/sysbenchseqrw/action.yml +++ b/.github/actions/sysbenchseqrw/action.yml @@ -26,6 +26,12 @@ runs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target shell: bash run: make juicefs diff --git a/.github/actions/vdbench/action.yml b/.github/actions/vdbench/action.yml index 1a5eef345727..3fbc0a051f29 100644 --- a/.github/actions/vdbench/action.yml +++ b/.github/actions/vdbench/action.yml @@ -74,6 +74,12 @@ runs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target shell: bash run: | diff --git a/.github/actions/version-compatible/action.yml b/.github/actions/version-compatible/action.yml new file mode 100644 index 000000000000..3378271ca96f --- /dev/null +++ b/.github/actions/version-compatible/action.yml @@ -0,0 +1,226 @@ +name: 'Version Compatible' +description: 'Version Compatible action' +inputs: + meta_url: + description: 'meta url' + required: true + default: '' + mount_point: + description: 'mount point' + required: true + default: /tmp/myjfs + volume_name: + description: 'volume name' + required: true + default: myjfs + storage: + description: 'storage' + required: true + default: "minio" + bucket: + description: 'bucket' + required: true + default: "http://127.0.0.1:9000/juicefs-version-compatible" + access_key: + description: 'access key' + required: true + default: "minioadmin" + sercret_key: + description: 'secret key' + required: true + default: "minioadmin" + backward_versions: + description: 'backward versions' + required: true + default: 5 +runs: + using: "composite" + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.18.x' + + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + + - name: Build linux target + run: | + make juicefs + mv juicefs jfs_new + echo juicefs new version: $(./jfs_new -V) + shell: bash + + - name: create database + shell: bash + run: | + meta_url=${{inputs.meta_url}} + db_name=$(basename $meta_url | awk -F? '{print $1}') + if [[ "$meta_url" == mysql* ]]; then + user=$(echo $meta_url | awk -F/ '{print $3}' | awk -F@ '{print $1}' | awk -F: '{print $1}') + password=$(echo $meta_url | awk -F/ '{print $3}' | awk -F@ '{print $1}' | awk -F: '{print $2}') + test -n "$password" && password="-p$password" || password="" + host=$(basename $(dirname $meta_url) | awk -F@ '{print $2}'| sed 's/(//g' | sed 's/)//g' | awk -F: '{print $1}') + port=$(basename $(dirname $meta_url) | awk -F@ '{print $2}'| sed 's/(//g' | sed 's/)//g' | awk -F: '{print $2}') + test -z "$port" && port="3306" + mysql -u$user $password -h $host -P $port -e "drop database if exists $db_name; create database $db_name;" + elif [[ "$meta_url" == postgres* ]]; then + export PGPASSWORD="postgres" + printf "\set AUTOCOMMIT on\ndrop database if exists $db_name; create database $db_name; " | psql -U postgres -h localhost + fi + - name: Test + shell: bash + run: | + # # Consider command as failed when any component of the pipe fails: + # https://stackoverflow.com/questions/1221833/pipe-output-and-capture-exit-status-in-bash + set -o pipefail + ./mc config host add minio http://127.0.0.1:9000 minioadmin minioadmin + tests=( + "format:jfs_new, format:jfs_old, destroy:jfs_new" + "format:jfs_new, format:jfs_old, destroy:jfs_old" + "format:jfs_old, format:jfs_new, destroy:jfs_old" + "format:jfs_old, format:jfs_new, destroy:jfs_new" + "format:jfs_old, mount:jfs_old, write_file1_100M:jfs_old, umount:jfs_old, dump_backup1:jfs_old, flushmeta:-, load_backup1:jfs_new, config:jfs_new, fsck:jfs_new, mount:jfs_new, read_file1:jfs_new, umount:jfs_new, fsck:jfs_new, destroy:jfs_new " + "format:jfs_old, mount:jfs_old, write_file1_100M:jfs_old, umount:jfs_old, format:jfs_new, mount:jfs_new, read_file1:jfs_new, umount:jfs_new, fsck:jfs_new, destroy:jfs_new" + "format:jfs_old, mount:jfs_old, write_file1_10K:jfs_old, umount:jfs_old, format:jfs_new, mount:jfs_new, read_file1:jfs_new, umount:jfs_new, fsck:jfs_new, destroy:jfs_new" + "format:jfs_old, mount:jfs_old, write_file1_10K:jfs_old, write_file2_10K:jfs_old, umount:jfs_old, dump_backup1:jfs_old, flushmeta:-, load_backup1:jfs_new, config_encrypt:jfs_new, mount:jfs_new, read_file1:jfs_new, read_file2:jfs_new, umount:jfs_new, fsck:jfs_new, destroy:jfs_new " + ) + urls=($(curl -s https://api.github.com/repos/juicedata/juicefs/releases | grep browser_download_url | grep linux-amd64.tar.gz | awk -F\" '{print $4}' | head -${{ inputs.backward_versions }})) + for url in "${urls[@]}"; do + echo download url is: $url + wget -q $url + tar -zxf $(basename $url) + rm $(basename $url) + mv juicefs jfs_old + echo juicefs new version: $(./jfs_new -V) + echo juicefs old version: $(./jfs_old -V) + old_rev=$(./jfs_old -V | awk -F- '{print $1}' | awk -F ' ' '{print $3}') + if [[ "$old_rev" < "1.0.0" ]]; then + echo "Warning: we don't test compatibily for version under 1.0.0" + break + fi + for test in "${tests[@]}"; do + echo 'test is ' $test + echo 'new version is:' $(./jfs_new -V) + echo 'old version is:' $(./jfs_old -V) + IFS=',' read -a command_arr <<< "$test" + for command in "${command_arr[@]}"; do + jfs_bin=$(echo $command | awk -F: '{print $2}'| xargs) + jfs_cmd=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $1}') + echo 'jfs_bin is ' $jfs_bin, "cmd is " $jfs_cmd + case "$jfs_cmd" in + "format") + ./mc admin user remove minio juicedata || true + ./mc admin user add minio juicedata juicedata + ./mc admin policy set minio consoleAdmin user=juicedata + sudo ./$jfs_bin format --trash-days 0 --storage minio --bucket ${{ inputs.bucket }} --access-key juicedata --secret-key juicedata ${{ inputs.meta_url }} juicefs-version-compatible + echo "format finished" + ;; + "mount") + sudo ./$jfs_bin mount --no-usage-report -d ${{ inputs.meta_url }} ${{ inputs.mount_point }} + echo "mount finished" + ;; + "umount") + sudo ./$jfs_bin umount ${{ inputs.mount_point }} + echo "umount finished" + ;; + "destroy") + UUID=$(./$jfs_bin status ${{ inputs.meta_url }} | grep UUID | cut -d '"' -f 4) + if [ -n "$UUID" ];then + echo UUID is $UUID + sudo ./$jfs_bin destroy --force ${{ inputs.meta_url }} $UUID + fi + echo "destroy finished" + ;; + "write") + filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') + size=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $3}') + dd if=/dev/urandom of=${{ inputs.mount_point }}/tempfile iflag=fullblock,count_bytes bs=4k count=$size + md5_write="$filename:$(cat ${{ inputs.mount_point }}/tempfile | md5sum)" + echo "write: filename is: " $filename "md5_write is: " $md5_write + cp ${{inputs.mount_point}}/tempfile ${{ inputs.mount_point }}/$filename + echo "write finished" + ;; + "read") + filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') + read_md5=$(cat ${{ inputs.mount_point }}/$filename | md5sum) + written_filename=$(echo $md5_write | awk -F: '{print $1}') + written_md5=$(echo $md5_write | awk -F: '{print $2}') + echo "read: filename is: " $filename "read_md5 is: " $read_md5, "written_filename is:", $written_filename, "written_md5 is:", $written_md5, + if [ "$filename" == "$wrtten_filename" ] && [ "$read_md5" != "$written_md5" ];then + echo "FATAL: the md5 does not match for: ", $filename, "read_md5:", $read_md5, "written_md5:", $written_md5 + exit 1 + fi + echo "read finished" + ;; + "dump") + filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') + sudo ./$jfs_bin dump ${{ inputs.meta_url }} $filename + echo "dump finished" + ;; + "load") + filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') + echo filename is : $filename + sudo ./$jfs_bin load ${{inputs.meta_url}} $filename + echo "load finished" + ;; + "config") + encrypt=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') + ./mc admin user remove minio juicedata || true + ./mc admin user add minio juicedata juicedata1 + ./mc admin policy set minio consoleAdmin user=juicedata + if [ -n "$encrypt" ]; then + sudo ./$jfs_bin config ${{inputs.meta_url}} --secret-key juicedata1 --encrypt-secret + else + sudo ./$jfs_bin config ${{inputs.meta_url}} --secret-key juicedata1 + fi + sleep 60 + echo "config finished" + ;; + "load") + filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') + sudo ./$jfs_bin load ${{ inputs.meta_url }} $filename + echo "load finished" + ;; + "status") + sudo ./$jfs_bin status ${{ inputs.meta_url }} + echo "status finished" + ;; + "fsck") + sudo ./$jfs_bin fsck ${{ inputs.meta_url }} + echo "fsck finished" + ;; + "flushmeta") + meta_url=${{inputs.meta_url}} + if [[ "$meta_url" == redis* ]]; then + redis-cli flushall + elif [[ "$meta_url" == mysql* ]]; then + db_name=$(basename $meta_url | awk -F? '{print $1}') + user=$(echo $meta_url | awk -F/ '{print $3}' | awk -F@ '{print $1}' | awk -F: '{print $1}') + password=$(echo $meta_url | awk -F/ '{print $3}' | awk -F@ '{print $1}' | awk -F: '{print $2}') + test -n "$password" && password="-p$password" || password="" + host=$(basename $(dirname $meta_url) | awk -F@ '{print $2}'| sed 's/(//g' | sed 's/)//g' | awk -F: '{print $1}') + port=$(basename $(dirname $meta_url) | awk -F@ '{print $2}'| sed 's/(//g' | sed 's/)//g' | awk -F: '{print $2}') + test -z "$port" && port="3306" + mysql -u$user $password -h $host -P $port -e "drop database if exists $db_name; create database $db_name;" + elif [[ "$meta_url" == postgres* ]]; then + db_name=$(basename $meta_url | awk -F? '{print $1}') + export PGPASSWORD="postgres" + printf "\set AUTOCOMMIT on\ndrop database if exists $db_name; create database $db_name; " | psql -U postgres -h localhost + fi + echo "fsck finished" + ;; + esac + done + done + done + + - name: log + if: ${{ always() }} + shell: bash + run: | + tail -300 /var/log/juicefs.log + grep ":" /var/log/juicefs.log && exit 1 || true \ No newline at end of file diff --git a/.github/workflows/aitests.yml b/.github/workflows/aitests.yml index e4e06661d7a1..34480d90a913 100644 --- a/.github/workflows/aitests.yml +++ b/.github/workflows/aitests.yml @@ -43,6 +43,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/aitests_limitcache.yml b/.github/workflows/aitests_limitcache.yml index cc47af3bb33c..9c313ebeddab 100644 --- a/.github/workflows/aitests_limitcache.yml +++ b/.github/workflows/aitests_limitcache.yml @@ -43,6 +43,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index cb0df1888e76..7030ff1097c0 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -52,6 +52,11 @@ jobs: uses: actions/setup-go@v2 with: go-version: '1.18.x' + + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/elastictest.yml b/.github/workflows/elastictest.yml index 47f4e5b95c39..a6f2f47f0588 100644 --- a/.github/workflows/elastictest.yml +++ b/.github/workflows/elastictest.yml @@ -43,6 +43,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/encoding_mysql.yml b/.github/workflows/encoding_mysql.yml index f722237c333e..b2871d4fd52e 100644 --- a/.github/workflows/encoding_mysql.yml +++ b/.github/workflows/encoding_mysql.yml @@ -49,6 +49,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | url=https://github.com/juicedata/juicefs/releases/download/v1.0.0-beta2/juicefs-1.0.0-beta2-linux-amd64.tar.gz diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 057e158d8230..8d1e685e64c2 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -52,6 +52,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index 8b9af4546ed0..02d700722bad 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -527,6 +527,7 @@ jobs: with: go-version: '1.18.x' +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -536,6 +537,13 @@ jobs: restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | make juicefs diff --git a/.github/workflows/gc.yml b/.github/workflows/gc.yml index d4f680e0b11b..b98995185579 100644 --- a/.github/workflows/gc.yml +++ b/.github/workflows/gc.yml @@ -50,6 +50,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index 13eabd794311..8115947f1499 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -36,6 +36,7 @@ jobs: with: fetch-depth: 1 +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -44,6 +45,12 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | diff --git a/.github/workflows/ltpfs.yml b/.github/workflows/ltpfs.yml index c7dd5162aa83..a766e472c91b 100644 --- a/.github/workflows/ltpfs.yml +++ b/.github/workflows/ltpfs.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallshead.yml b/.github/workflows/ltpsyscallshead.yml index 5a3565788420..2210b6aea95d 100644 --- a/.github/workflows/ltpsyscallshead.yml +++ b/.github/workflows/ltpsyscallshead.yml @@ -33,6 +33,7 @@ jobs: with: fetch-depth: 1 +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -41,6 +42,12 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | diff --git a/.github/workflows/ltpsyscallsmiddle.yml b/.github/workflows/ltpsyscallsmiddle.yml index 63a883d0f447..01cfca6b73bd 100644 --- a/.github/workflows/ltpsyscallsmiddle.yml +++ b/.github/workflows/ltpsyscallsmiddle.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallstail.yml b/.github/workflows/ltpsyscallstail.yml index aa657a5a19d7..82570119ec0e 100644 --- a/.github/workflows/ltpsyscallstail.yml +++ b/.github/workflows/ltpsyscallstail.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/mdtest.yml b/.github/workflows/mdtest.yml index 677d38d0867c..69451c2a0cfe 100644 --- a/.github/workflows/mdtest.yml +++ b/.github/workflows/mdtest.yml @@ -49,6 +49,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | export GOPATH=/usr/local/go diff --git a/.github/workflows/mongodb_mmap.yml b/.github/workflows/mongodb_mmap.yml index 9a18826f8f3a..01dfe9111523 100644 --- a/.github/workflows/mongodb_mmap.yml +++ b/.github/workflows/mongodb_mmap.yml @@ -46,6 +46,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/mysqltest_bigtable.yml b/.github/workflows/mysqltest_bigtable.yml index 40802f8d85c3..e16b05774d4f 100644 --- a/.github/workflows/mysqltest_bigtable.yml +++ b/.github/workflows/mysqltest_bigtable.yml @@ -33,6 +33,7 @@ jobs: with: fetch-depth: 1 +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -41,6 +42,12 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: make juicefs diff --git a/.github/workflows/mysqltest_smalltable.yml b/.github/workflows/mysqltest_smalltable.yml index 1b8da2a57897..f7ab45fc95e3 100644 --- a/.github/workflows/mysqltest_smalltable.yml +++ b/.github/workflows/mysqltest_smalltable.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/pjdfstest.yml b/.github/workflows/pjdfstest.yml index e3a34df7b8b9..4b2aa359b1ad 100644 --- a/.github/workflows/pjdfstest.yml +++ b/.github/workflows/pjdfstest.yml @@ -49,6 +49,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/redis_compile.yml b/.github/workflows/redis_compile.yml index 270a07cf5a09..f89148926aef 100644 --- a/.github/workflows/redis_compile.yml +++ b/.github/workflows/redis_compile.yml @@ -39,6 +39,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/sdktest.yml b/.github/workflows/sdktest.yml index 0e72381349d2..bcb15929a8f8 100644 --- a/.github/workflows/sdktest.yml +++ b/.github/workflows/sdktest.yml @@ -47,6 +47,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 74d84567c1a1..62f9dcbdf561 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -50,6 +50,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: Build linux target run: make juicefs @@ -179,6 +184,11 @@ jobs: uses: actions/setup-go@v2 with: go-version: '1.18.x' + + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/tpcds.yml b/.github/workflows/tpcds.yml index d0259d4e1270..33d5c605d000 100644 --- a/.github/workflows/tpcds.yml +++ b/.github/workflows/tpcds.yml @@ -51,6 +51,7 @@ jobs: with: fetch-depth: 1 +<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -60,6 +61,13 @@ jobs: restore-keys: | ${{ runner.os }}-go- +======= + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + +>>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: make juicefs diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index ba3913f19907..04172e53b640 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -66,6 +66,11 @@ jobs: sudo apt install -y attr sudo mkdir -p /home/travis/.m2/ + - name: Install FoundationDB + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-server_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb foundationdb-server_6.3.24-1_amd64.deb - name: Download Zip run: | diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 0f2088ea1e96..c28748ceba58 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -27,6 +27,12 @@ jobs: with: go-version: '1.17.x' - uses: actions/checkout@v2 + + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -47,6 +53,11 @@ jobs: run: | sudo apt-get update sudo apt-get install g++-multilib gcc-mingw-w64 + + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/go.mod b/go.mod index fb5be47ca3ed..4742d66db82c 100644 --- a/go.mod +++ b/go.mod @@ -85,6 +85,7 @@ require ( github.com/VividCortex/ewma v1.2.0 // indirect github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect github.com/alecthomas/participle v0.2.1 // indirect + github.com/apple/foundationdb/bindings/go v0.0.0-20220521054011-a88e049b28d8 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect github.com/bcicen/jstream v1.0.1 // indirect github.com/beevik/ntp v0.3.0 // indirect diff --git a/go.sum b/go.sum index 8abec3f60c0c..3e050df15a95 100644 --- a/go.sum +++ b/go.sum @@ -148,6 +148,10 @@ github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQY github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apple/foundationdb/bindings/go v0.0.0-20220521054011-a88e049b28d8 h1:B1KM1sz2bMjLThSQZSg+2kE2OBFMbtGdDcekqj0t2z0= +github.com/apple/foundationdb/bindings/go v0.0.0-20220521054011-a88e049b28d8/go.mod h1:w63jdZTFCtvdjsUj5yrdKgjxaAD5uXQX6hJ7EaiLFRs= +github.com/apple/foundationdb/bindings/go v0.0.0-20220813071020-a27d27c5ee3f h1:PA77dtgXt8+8/4fiXhqqc7ZeZReOUR5PnAfZ+TkjxSk= +github.com/apple/foundationdb/bindings/go v0.0.0-20220813071020-a27d27c5ee3f/go.mod h1:w63jdZTFCtvdjsUj5yrdKgjxaAD5uXQX6hJ7EaiLFRs= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= diff --git a/pkg/meta/benchmarks_test.go b/pkg/meta/benchmarks_test.go index c88c757d5200..7833e349f666 100644 --- a/pkg/meta/benchmarks_test.go +++ b/pkg/meta/benchmarks_test.go @@ -30,7 +30,8 @@ const ( sqlAddr = "sqlite3://juicefs.db" // sqlAddr = "mysql://root:@/juicefs" // MySQL // sqlAddr = "mysql://root:@tcp(127.0.0.1:4000)/juicefs" // TiDB - tkvAddr = "badger://test_db" + tkvAddr = "fdb:///etc/foundationdb/fdb.cluster:fdb_test" + // tkvAddr = "badger://test_db" // tkvAddr = "tikv://127.0.0.1:2379/juicefs" ) diff --git a/pkg/meta/tkv_fdb.go b/pkg/meta/tkv_fdb.go new file mode 100644 index 000000000000..d3aa7aa705c1 --- /dev/null +++ b/pkg/meta/tkv_fdb.go @@ -0,0 +1,187 @@ +//go:build linux +// +build linux + +/* + * JuiceFS, Copyright 2021 Juicedata, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package meta + +import ( + "fmt" + "strings" + + fdb "github.com/apple/foundationdb/bindings/go/src/fdb" +) + +func init() { + Register("fdb", newKVMeta) + drivers["fdb"] = newFdbClient +} + +type fdbTxn struct { + fdb.Transaction +} + +type fdbClient struct { + client fdb.Database +} + +func newFdbClient(address string) (tkvClient, error) { + args := strings.Split(address, ":") + err := fdb.APIVersion(630) + if err != nil { + return nil, fmt.Errorf("set API version: %s", err) + } + db, err := fdb.OpenDatabase(args[0]) + if err != nil { + return nil, fmt.Errorf("open DataBase Failed: %s", err) + } + prefix := "" + if len(args) == 2 { + prefix = args[1] + } + return withPrefix(&fdbClient{db}, append([]byte(prefix), 0xFD)), nil +} + +func (c *fdbClient) name() string { + return "fdb" +} + +func (c *fdbClient) txn(f func(kvTxn) error) error { + _, err := c.client.Transact(func(t fdb.Transaction) (interface{}, error) { + e := f(&fdbTxn{t}) + return nil, e + }) + return err +} + +func (c *fdbClient) scan(prefix []byte, handler func(key, value []byte)) error { + _, err := c.client.ReadTransact(func(t fdb.ReadTransaction) (interface{}, error) { + snapshot := t.Snapshot() + iter := snapshot.GetRange( + fdb.KeyRange{Begin: fdb.Key(prefix), End: fdb.Key(nextKey(prefix))}, + fdb.RangeOptions{}, + ).Iterator() + for iter.Advance() { + r := iter.MustGet() + handler(r.Key, r.Value) + } + return nil, nil + }) + return err +} + +func (c *fdbClient) reset(prefix []byte) error { + _, err := c.client.Transact(func(t fdb.Transaction) (interface{}, error) { + t.ClearRange(fdb.KeyRange{ + Begin: fdb.Key(prefix), + End: fdb.Key(nextKey(prefix)), + }) + return nil, nil + }) + return err +} + +func (c *fdbClient) close() error { + // c = &fdbClient{} + return nil +} + +func (c *fdbClient) shouldRetry(err error) bool { + return false +} + +func (tx *fdbTxn) get(key []byte) []byte { + ret := tx.Get(fdb.Key(key)).MustGet() + return ret +} + +func (tx *fdbTxn) gets(keys ...[]byte) [][]byte { + ret := make([][]byte, len(keys)) + for i, key := range keys { + val := tx.Get(fdb.Key(key)).MustGet() + ret[i] = val + } + return ret +} + +func (tx *fdbTxn) range0(begin, end []byte) *fdb.RangeIterator { + return (tx.GetRange( + fdb.KeyRange{Begin: fdb.Key(begin), End: fdb.Key(end)}, + fdb.RangeOptions{Limit: 0, Mode: fdb.StreamingModeWantAll}, + ).Iterator()) +} + +func (tx *fdbTxn) scanRange(begin, end []byte) map[string][]byte { + ret := make(map[string][]byte) + iter := tx.range0(begin, end) + for iter.Advance() { + r := iter.MustGet() + ret[string(r.Key)] = r.Value + } + return ret +} + +func (tx *fdbTxn) scanKeys(prefix []byte) [][]byte { + ret := make([][]byte, 0) + iter := tx.range0(prefix, nextKey(prefix)) + for iter.Advance() { + ret = append(ret, iter.MustGet().Key) + } + return ret +} + +func (tx *fdbTxn) scanValues(prefix []byte, limit int, filter func(k, v []byte) bool) map[string][]byte { + ret := make(map[string][]byte) + iter := tx.range0(prefix, nextKey(prefix)) + for iter.Advance() { + r := iter.MustGet() + if filter == nil || filter(r.Key, r.Value) { + ret[string(r.Key)] = r.Value + if limit > 0 { + if limit--; limit == 0 { + break + } + } + } + } + return ret +} + +func (tx *fdbTxn) exist(prefix []byte) bool { + iter := tx.range0(prefix, nextKey(prefix)) + return iter.Advance() +} + +func (tx *fdbTxn) set(key, value []byte) { + tx.Set(fdb.Key(key), value) +} + +func (tx *fdbTxn) append(key []byte, value []byte) []byte { + tx.AppendIfFits(fdb.Key(key), fdb.Key(value)) + return tx.Get(fdb.Key(key)).MustGet() +} + +func (tx *fdbTxn) incrBy(key []byte, value int64) int64 { + tx.Add(fdb.Key(key), packCounter(value)) + return parseCounter(tx.Get(fdb.Key(key)).MustGet()) +} + +func (tx *fdbTxn) dels(keys ...[]byte) { + for _, key := range keys { + tx.Clear(fdb.Key(key)) + } +} diff --git a/pkg/meta/tkv_test.go b/pkg/meta/tkv_test.go index 6d18a8445244..d075afbf327d 100644 --- a/pkg/meta/tkv_test.go +++ b/pkg/meta/tkv_test.go @@ -56,6 +56,14 @@ func TestEtcdClient(t *testing.T) { testMeta(t, m) } +func TestFdbClient(t *testing.T) { + m, err := newKVMeta("fdb", "/etc/foundationdb/fdb.cluster:fdb_test", &Config{}) + if err != nil { + t.Fatalf("create meta: %s", err) + } + testMeta(t, m) +} + func testTKV(t *testing.T, c tkvClient) { txn := func(f func(kt kvTxn)) { if err := c.txn(func(kt kvTxn) error { From a8d42986ef81567837062c4822af2af0ebeba552 Mon Sep 17 00:00:00 2001 From: yfeng Date: Sun, 18 Sep 2022 23:34:37 +0800 Subject: [PATCH 02/10] files not saved while resolving conflicts --- .github/actions/fio/action.yml | 3 --- .github/actions/gateway/action.yml | 3 --- .github/actions/rmr/action.yml | 3 --- .github/actions/sysbenchrndrw/action.yml | 3 --- .github/workflows/gateway.yml | 3 --- .github/workflows/integrationtests.yml | 4 +--- .github/workflows/ltpsyscallshead.yml | 4 +--- .github/workflows/mysqltest_bigtable.yml | 4 +--- .github/workflows/tpcds.yml | 3 --- 9 files changed, 3 insertions(+), 27 deletions(-) diff --git a/.github/actions/fio/action.yml b/.github/actions/fio/action.yml index 42d9807e8d5d..e7166ac5b615 100644 --- a/.github/actions/fio/action.yml +++ b/.github/actions/fio/action.yml @@ -69,7 +69,6 @@ runs: with: go-version: '1.18.x' -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -79,14 +78,12 @@ runs: restore-keys: | ${{ runner.os }}-go- -======= - name: Install Fdb C Lib shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | make juicefs diff --git a/.github/actions/gateway/action.yml b/.github/actions/gateway/action.yml index 9e356a7cdb78..c7d1474b2a9c 100644 --- a/.github/actions/gateway/action.yml +++ b/.github/actions/gateway/action.yml @@ -43,7 +43,6 @@ runs: with: go-version: '1.18.x' -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -52,13 +51,11 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- -======= - name: Install Fdb C Lib shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | diff --git a/.github/actions/rmr/action.yml b/.github/actions/rmr/action.yml index 0254528e0d01..20ff329b8c03 100644 --- a/.github/actions/rmr/action.yml +++ b/.github/actions/rmr/action.yml @@ -22,7 +22,6 @@ runs: with: go-version: '1.18.x' -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -31,13 +30,11 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- -======= - name: Install Fdb C Lib shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | diff --git a/.github/actions/sysbenchrndrw/action.yml b/.github/actions/sysbenchrndrw/action.yml index b04992776702..e641eb6869c0 100644 --- a/.github/actions/sysbenchrndrw/action.yml +++ b/.github/actions/sysbenchrndrw/action.yml @@ -17,7 +17,6 @@ runs: - name: Set up Docker uses: docker-practice/actions-setup-docker@master -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -26,13 +25,11 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- -======= - name: Install Fdb C Lib shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target shell: bash diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index 02d700722bad..d43254b5e969 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -527,7 +527,6 @@ jobs: with: go-version: '1.18.x' -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -537,13 +536,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- -======= - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | make juicefs diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index 8115947f1499..9cc0577bdca6 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -36,7 +36,6 @@ jobs: with: fetch-depth: 1 -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -45,12 +44,11 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- -======= + - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | diff --git a/.github/workflows/ltpsyscallshead.yml b/.github/workflows/ltpsyscallshead.yml index 2210b6aea95d..77063bdb554c 100644 --- a/.github/workflows/ltpsyscallshead.yml +++ b/.github/workflows/ltpsyscallshead.yml @@ -33,7 +33,6 @@ jobs: with: fetch-depth: 1 -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -42,12 +41,11 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- -======= + - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: | diff --git a/.github/workflows/mysqltest_bigtable.yml b/.github/workflows/mysqltest_bigtable.yml index e16b05774d4f..1f75348fabd7 100644 --- a/.github/workflows/mysqltest_bigtable.yml +++ b/.github/workflows/mysqltest_bigtable.yml @@ -33,7 +33,6 @@ jobs: with: fetch-depth: 1 -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -42,12 +41,11 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- -======= + - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: make juicefs diff --git a/.github/workflows/tpcds.yml b/.github/workflows/tpcds.yml index 33d5c605d000..452d39bdb8d5 100644 --- a/.github/workflows/tpcds.yml +++ b/.github/workflows/tpcds.yml @@ -51,7 +51,6 @@ jobs: with: fetch-depth: 1 -<<<<<<< HEAD - uses: actions/cache@v3 with: path: | @@ -61,13 +60,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- -======= - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb ->>>>>>> fdb : suport fdb for metadata engine - name: Build linux target run: make juicefs From b04a80d91844d38a58803e11f272addaa027cfd7 Mon Sep 17 00:00:00 2001 From: yfeng Date: Sun, 18 Sep 2022 23:47:51 +0800 Subject: [PATCH 03/10] fdb : some modify about fdb engine --- Makefile | 2 +- go.mod | 2 +- go.sum | 6 ++---- pkg/meta/tkv_fdb.go | 14 +++++++------- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 0b85ddbbd8eb..b6ac3f948c31 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ juicefs: Makefile cmd/*.go pkg/*/*.go go.* go build -ldflags="$(LDFLAGS)" -o juicefs . juicefs.lite: Makefile cmd/*.go pkg/*/*.go - go build -tags nogateway,nowebdav,nocos,nobos,nohdfs,noibmcos,noobs,nooss,noqingstor,noscs,nosftp,noswift,noupyun,noazure,nogs,noufile,nob2,nosqlite,nomysql,nopg,notikv,nobadger,noetcd \ + go build -tags nogateway,nowebdav,nocos,nobos,nohdfs,noibmcos,noobs,nooss,noqingstor,noscs,nosftp,noswift,noupyun,noazure,nogs,noufile,nob2,nosqlite,nomysql,nopg,notikv,nobadger,noetcd,nofdb \ -ldflags="$(LDFLAGS)" -o juicefs.lite . juicefs.ceph: Makefile cmd/*.go pkg/*/*.go diff --git a/go.mod b/go.mod index 4742d66db82c..281d3cf3148e 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( github.com/VividCortex/ewma v1.2.0 // indirect github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect github.com/alecthomas/participle v0.2.1 // indirect - github.com/apple/foundationdb/bindings/go v0.0.0-20220521054011-a88e049b28d8 + github.com/apple/foundationdb/bindings/go v0.0.0-20211207225159-47b9a81d1c10 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect github.com/bcicen/jstream v1.0.1 // indirect github.com/beevik/ntp v0.3.0 // indirect diff --git a/go.sum b/go.sum index 3e050df15a95..8ce61717e99a 100644 --- a/go.sum +++ b/go.sum @@ -148,10 +148,8 @@ github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQY github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apple/foundationdb/bindings/go v0.0.0-20220521054011-a88e049b28d8 h1:B1KM1sz2bMjLThSQZSg+2kE2OBFMbtGdDcekqj0t2z0= -github.com/apple/foundationdb/bindings/go v0.0.0-20220521054011-a88e049b28d8/go.mod h1:w63jdZTFCtvdjsUj5yrdKgjxaAD5uXQX6hJ7EaiLFRs= -github.com/apple/foundationdb/bindings/go v0.0.0-20220813071020-a27d27c5ee3f h1:PA77dtgXt8+8/4fiXhqqc7ZeZReOUR5PnAfZ+TkjxSk= -github.com/apple/foundationdb/bindings/go v0.0.0-20220813071020-a27d27c5ee3f/go.mod h1:w63jdZTFCtvdjsUj5yrdKgjxaAD5uXQX6hJ7EaiLFRs= +github.com/apple/foundationdb/bindings/go v0.0.0-20211207225159-47b9a81d1c10 h1:xU6bzJilZ630rLUhRsqWgJjSl2PCn5uLrehoG6ntwls= +github.com/apple/foundationdb/bindings/go v0.0.0-20211207225159-47b9a81d1c10/go.mod h1:w63jdZTFCtvdjsUj5yrdKgjxaAD5uXQX6hJ7EaiLFRs= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= diff --git a/pkg/meta/tkv_fdb.go b/pkg/meta/tkv_fdb.go index d3aa7aa705c1..470f3b612675 100644 --- a/pkg/meta/tkv_fdb.go +++ b/pkg/meta/tkv_fdb.go @@ -1,8 +1,8 @@ -//go:build linux -// +build linux +//go:build !nofdb +// +build !nofdb /* - * JuiceFS, Copyright 2021 Juicedata, Inc. + * JuiceFS, Copyright 2022 Juicedata, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,7 +73,7 @@ func (c *fdbClient) scan(prefix []byte, handler func(key, value []byte)) error { snapshot := t.Snapshot() iter := snapshot.GetRange( fdb.KeyRange{Begin: fdb.Key(prefix), End: fdb.Key(nextKey(prefix))}, - fdb.RangeOptions{}, + fdb.RangeOptions{Mode: fdb.StreamingModeWantAll}, ).Iterator() for iter.Advance() { r := iter.MustGet() @@ -119,10 +119,10 @@ func (tx *fdbTxn) gets(keys ...[]byte) [][]byte { } func (tx *fdbTxn) range0(begin, end []byte) *fdb.RangeIterator { - return (tx.GetRange( + return tx.GetRange( fdb.KeyRange{Begin: fdb.Key(begin), End: fdb.Key(end)}, - fdb.RangeOptions{Limit: 0, Mode: fdb.StreamingModeWantAll}, - ).Iterator()) + fdb.RangeOptions{Mode: fdb.StreamingModeWantAll}, + ).Iterator() } func (tx *fdbTxn) scanRange(begin, end []byte) map[string][]byte { From 2aa577afd6465331dd06fbdd618ad376dbf79532 Mon Sep 17 00:00:00 2001 From: yfeng Date: Sun, 18 Sep 2022 23:56:18 +0800 Subject: [PATCH 04/10] fdb : change the version of foundationdb --- .github/actions/clickhouse/action.yml | 2 +- .github/actions/fio/action.yml | 2 +- .github/actions/gateway/action.yml | 2 +- .github/actions/load/action.yml | 2 +- .github/actions/rmr/action.yml | 2 +- .github/actions/sysbenchrndrw/action.yml | 2 +- .github/actions/sysbenchseqrw/action.yml | 2 +- .github/actions/vdbench/action.yml | 2 +- .github/actions/version-compatible/action.yml | 2 +- .github/workflows/aitests.yml | 2 +- .github/workflows/aitests_limitcache.yml | 2 +- .github/workflows/config.yml | 2 +- .github/workflows/elastictest.yml | 2 +- .github/workflows/encoding_mysql.yml | 2 +- .github/workflows/format.yml | 2 +- .github/workflows/gateway.yml | 2 +- .github/workflows/gc.yml | 2 +- .github/workflows/integrationtests.yml | 2 +- .github/workflows/ltpfs.yml | 2 +- .github/workflows/ltpsyscallshead.yml | 2 +- .github/workflows/ltpsyscallsmiddle.yml | 2 +- .github/workflows/ltpsyscallstail.yml | 2 +- .github/workflows/mdtest.yml | 2 +- .github/workflows/mongodb_mmap.yml | 2 +- .github/workflows/mysqltest_bigtable.yml | 2 +- .github/workflows/mysqltest_smalltable.yml | 2 +- .github/workflows/pjdfstest.yml | 2 +- .github/workflows/redis_compile.yml | 2 +- .github/workflows/sdktest.yml | 2 +- .github/workflows/sync.yml | 4 ++-- .github/workflows/tpcds.yml | 2 +- .github/workflows/unittests.yml | 4 ++-- .github/workflows/verify.yml | 4 ++-- 33 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/actions/clickhouse/action.yml b/.github/actions/clickhouse/action.yml index ca91a41bab1a..cf91afc3a916 100644 --- a/.github/actions/clickhouse/action.yml +++ b/.github/actions/clickhouse/action.yml @@ -29,7 +29,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/actions/fio/action.yml b/.github/actions/fio/action.yml index e7166ac5b615..d8e4a957170a 100644 --- a/.github/actions/fio/action.yml +++ b/.github/actions/fio/action.yml @@ -81,7 +81,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/actions/gateway/action.yml b/.github/actions/gateway/action.yml index c7d1474b2a9c..b68f795d626f 100644 --- a/.github/actions/gateway/action.yml +++ b/.github/actions/gateway/action.yml @@ -54,7 +54,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/actions/load/action.yml b/.github/actions/load/action.yml index 6401cf5c3ab2..d1275310147e 100644 --- a/.github/actions/load/action.yml +++ b/.github/actions/load/action.yml @@ -30,7 +30,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/actions/rmr/action.yml b/.github/actions/rmr/action.yml index 20ff329b8c03..9bad8d576211 100644 --- a/.github/actions/rmr/action.yml +++ b/.github/actions/rmr/action.yml @@ -33,7 +33,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/actions/sysbenchrndrw/action.yml b/.github/actions/sysbenchrndrw/action.yml index e641eb6869c0..a481dca3dea7 100644 --- a/.github/actions/sysbenchrndrw/action.yml +++ b/.github/actions/sysbenchrndrw/action.yml @@ -28,7 +28,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/actions/sysbenchseqrw/action.yml b/.github/actions/sysbenchseqrw/action.yml index e780424627fc..986cd82c2278 100644 --- a/.github/actions/sysbenchseqrw/action.yml +++ b/.github/actions/sysbenchseqrw/action.yml @@ -29,7 +29,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/actions/vdbench/action.yml b/.github/actions/vdbench/action.yml index 3fbc0a051f29..76e0cbb89a8b 100644 --- a/.github/actions/vdbench/action.yml +++ b/.github/actions/vdbench/action.yml @@ -77,7 +77,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/actions/version-compatible/action.yml b/.github/actions/version-compatible/action.yml index 3378271ca96f..45b3d90ee9ca 100644 --- a/.github/actions/version-compatible/action.yml +++ b/.github/actions/version-compatible/action.yml @@ -44,7 +44,7 @@ runs: - name: Install Fdb C Lib shell: bash run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/aitests.yml b/.github/workflows/aitests.yml index 34480d90a913..2ac19c9c18a4 100644 --- a/.github/workflows/aitests.yml +++ b/.github/workflows/aitests.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/aitests_limitcache.yml b/.github/workflows/aitests_limitcache.yml index 9c313ebeddab..df5a4499c2fb 100644 --- a/.github/workflows/aitests_limitcache.yml +++ b/.github/workflows/aitests_limitcache.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 7030ff1097c0..9688a14153f7 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -55,7 +55,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - uses: actions/cache@v3 diff --git a/.github/workflows/elastictest.yml b/.github/workflows/elastictest.yml index a6f2f47f0588..f26e9e964ed1 100644 --- a/.github/workflows/elastictest.yml +++ b/.github/workflows/elastictest.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/encoding_mysql.yml b/.github/workflows/encoding_mysql.yml index b2871d4fd52e..fc0a0914f27e 100644 --- a/.github/workflows/encoding_mysql.yml +++ b/.github/workflows/encoding_mysql.yml @@ -51,7 +51,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 8d1e685e64c2..045b6355b781 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -54,7 +54,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index d43254b5e969..a516c9ff40ea 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -538,7 +538,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/gc.yml b/.github/workflows/gc.yml index b98995185579..e343cb3528c1 100644 --- a/.github/workflows/gc.yml +++ b/.github/workflows/gc.yml @@ -52,7 +52,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index 9cc0577bdca6..4b5937a7c40f 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -47,7 +47,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/ltpfs.yml b/.github/workflows/ltpfs.yml index a766e472c91b..8f30986dff50 100644 --- a/.github/workflows/ltpfs.yml +++ b/.github/workflows/ltpfs.yml @@ -44,7 +44,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/ltpsyscallshead.yml b/.github/workflows/ltpsyscallshead.yml index 77063bdb554c..f6cd003a7abc 100644 --- a/.github/workflows/ltpsyscallshead.yml +++ b/.github/workflows/ltpsyscallshead.yml @@ -44,7 +44,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/ltpsyscallsmiddle.yml b/.github/workflows/ltpsyscallsmiddle.yml index 01cfca6b73bd..70a3e00e276f 100644 --- a/.github/workflows/ltpsyscallsmiddle.yml +++ b/.github/workflows/ltpsyscallsmiddle.yml @@ -44,7 +44,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/ltpsyscallstail.yml b/.github/workflows/ltpsyscallstail.yml index 82570119ec0e..6133c4992e06 100644 --- a/.github/workflows/ltpsyscallstail.yml +++ b/.github/workflows/ltpsyscallstail.yml @@ -44,7 +44,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/mdtest.yml b/.github/workflows/mdtest.yml index 69451c2a0cfe..d7fd1df33b34 100644 --- a/.github/workflows/mdtest.yml +++ b/.github/workflows/mdtest.yml @@ -51,7 +51,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/mongodb_mmap.yml b/.github/workflows/mongodb_mmap.yml index 01dfe9111523..d679c77cb3d4 100644 --- a/.github/workflows/mongodb_mmap.yml +++ b/.github/workflows/mongodb_mmap.yml @@ -48,7 +48,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/mysqltest_bigtable.yml b/.github/workflows/mysqltest_bigtable.yml index 1f75348fabd7..b73e2ecb1de8 100644 --- a/.github/workflows/mysqltest_bigtable.yml +++ b/.github/workflows/mysqltest_bigtable.yml @@ -44,7 +44,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/mysqltest_smalltable.yml b/.github/workflows/mysqltest_smalltable.yml index f7ab45fc95e3..0d16220cc9bd 100644 --- a/.github/workflows/mysqltest_smalltable.yml +++ b/.github/workflows/mysqltest_smalltable.yml @@ -44,7 +44,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/pjdfstest.yml b/.github/workflows/pjdfstest.yml index 4b2aa359b1ad..ac83c4b562f6 100644 --- a/.github/workflows/pjdfstest.yml +++ b/.github/workflows/pjdfstest.yml @@ -51,7 +51,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/redis_compile.yml b/.github/workflows/redis_compile.yml index f89148926aef..c8cec8235f29 100644 --- a/.github/workflows/redis_compile.yml +++ b/.github/workflows/redis_compile.yml @@ -41,7 +41,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/sdktest.yml b/.github/workflows/sdktest.yml index bcb15929a8f8..9e4f43af1ba6 100644 --- a/.github/workflows/sdktest.yml +++ b/.github/workflows/sdktest.yml @@ -49,7 +49,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 62f9dcbdf561..f25aaed3f059 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -52,7 +52,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target @@ -187,7 +187,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - uses: actions/cache@v3 diff --git a/.github/workflows/tpcds.yml b/.github/workflows/tpcds.yml index 452d39bdb8d5..b11daad8bbcb 100644 --- a/.github/workflows/tpcds.yml +++ b/.github/workflows/tpcds.yml @@ -62,7 +62,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: Build linux target diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 04172e53b640..5db1072c2079 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -68,8 +68,8 @@ jobs: - name: Install FoundationDB run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-server_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-server_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb foundationdb-server_6.3.24-1_amd64.deb - name: Download Zip diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index c28748ceba58..cbdf9de74763 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -30,7 +30,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - name: golangci-lint @@ -56,7 +56,7 @@ jobs: - name: Install Fdb C Lib run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.24/foundationdb-clients_6.3.24-1_amd64.deb + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb - uses: actions/cache@v3 From 2dac1140a8e4e8a1bc9326cefc780669d9a85d04 Mon Sep 17 00:00:00 2001 From: yfeng Date: Mon, 19 Sep 2022 00:01:36 +0800 Subject: [PATCH 05/10] fdb : change version for foundatuondb --- .github/actions/clickhouse/action.yml | 2 +- .github/actions/fio/action.yml | 2 +- .github/actions/gateway/action.yml | 2 +- .github/actions/load/action.yml | 2 +- .github/actions/rmr/action.yml | 2 +- .github/actions/sysbenchrndrw/action.yml | 2 +- .github/actions/sysbenchseqrw/action.yml | 2 +- .github/actions/vdbench/action.yml | 2 +- .github/actions/version-compatible/action.yml | 2 +- .github/workflows/aitests.yml | 2 +- .github/workflows/aitests_limitcache.yml | 2 +- .github/workflows/config.yml | 2 +- .github/workflows/elastictest.yml | 2 +- .github/workflows/encoding_mysql.yml | 2 +- .github/workflows/format.yml | 2 +- .github/workflows/gateway.yml | 2 +- .github/workflows/gc.yml | 2 +- .github/workflows/integrationtests.yml | 2 +- .github/workflows/ltpfs.yml | 2 +- .github/workflows/ltpsyscallshead.yml | 2 +- .github/workflows/ltpsyscallsmiddle.yml | 2 +- .github/workflows/ltpsyscallstail.yml | 2 +- .github/workflows/mdtest.yml | 2 +- .github/workflows/mongodb_mmap.yml | 2 +- .github/workflows/mysqltest_bigtable.yml | 2 +- .github/workflows/mysqltest_smalltable.yml | 2 +- .github/workflows/pjdfstest.yml | 2 +- .github/workflows/redis_compile.yml | 2 +- .github/workflows/sdktest.yml | 2 +- .github/workflows/sync.yml | 4 ++-- .github/workflows/tpcds.yml | 2 +- .github/workflows/unittests.yml | 2 +- .github/workflows/verify.yml | 4 ++-- 33 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/actions/clickhouse/action.yml b/.github/actions/clickhouse/action.yml index cf91afc3a916..f0708ad8a25a 100644 --- a/.github/actions/clickhouse/action.yml +++ b/.github/actions/clickhouse/action.yml @@ -30,7 +30,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target shell: bash diff --git a/.github/actions/fio/action.yml b/.github/actions/fio/action.yml index d8e4a957170a..f8ba5ff59e69 100644 --- a/.github/actions/fio/action.yml +++ b/.github/actions/fio/action.yml @@ -82,7 +82,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/gateway/action.yml b/.github/actions/gateway/action.yml index b68f795d626f..7e4d93b07f61 100644 --- a/.github/actions/gateway/action.yml +++ b/.github/actions/gateway/action.yml @@ -55,7 +55,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/load/action.yml b/.github/actions/load/action.yml index d1275310147e..3b4f8f7a0d88 100644 --- a/.github/actions/load/action.yml +++ b/.github/actions/load/action.yml @@ -31,7 +31,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/rmr/action.yml b/.github/actions/rmr/action.yml index 9bad8d576211..19bd5fabdeea 100644 --- a/.github/actions/rmr/action.yml +++ b/.github/actions/rmr/action.yml @@ -34,7 +34,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/sysbenchrndrw/action.yml b/.github/actions/sysbenchrndrw/action.yml index a481dca3dea7..effc84593c9c 100644 --- a/.github/actions/sysbenchrndrw/action.yml +++ b/.github/actions/sysbenchrndrw/action.yml @@ -29,7 +29,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target shell: bash diff --git a/.github/actions/sysbenchseqrw/action.yml b/.github/actions/sysbenchseqrw/action.yml index 986cd82c2278..2dd1170e6451 100644 --- a/.github/actions/sysbenchseqrw/action.yml +++ b/.github/actions/sysbenchseqrw/action.yml @@ -30,7 +30,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target shell: bash diff --git a/.github/actions/vdbench/action.yml b/.github/actions/vdbench/action.yml index 76e0cbb89a8b..d318f8ba58ba 100644 --- a/.github/actions/vdbench/action.yml +++ b/.github/actions/vdbench/action.yml @@ -78,7 +78,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target shell: bash diff --git a/.github/actions/version-compatible/action.yml b/.github/actions/version-compatible/action.yml index 45b3d90ee9ca..fa1b88aeed78 100644 --- a/.github/actions/version-compatible/action.yml +++ b/.github/actions/version-compatible/action.yml @@ -45,7 +45,7 @@ runs: shell: bash run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/aitests.yml b/.github/workflows/aitests.yml index 2ac19c9c18a4..2eb6a252a8da 100644 --- a/.github/workflows/aitests.yml +++ b/.github/workflows/aitests.yml @@ -46,7 +46,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/aitests_limitcache.yml b/.github/workflows/aitests_limitcache.yml index df5a4499c2fb..6d917612baaa 100644 --- a/.github/workflows/aitests_limitcache.yml +++ b/.github/workflows/aitests_limitcache.yml @@ -46,7 +46,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 9688a14153f7..2d874b2ac7c4 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -56,7 +56,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/elastictest.yml b/.github/workflows/elastictest.yml index f26e9e964ed1..4465347e1645 100644 --- a/.github/workflows/elastictest.yml +++ b/.github/workflows/elastictest.yml @@ -46,7 +46,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/encoding_mysql.yml b/.github/workflows/encoding_mysql.yml index fc0a0914f27e..13f0755e73d4 100644 --- a/.github/workflows/encoding_mysql.yml +++ b/.github/workflows/encoding_mysql.yml @@ -52,7 +52,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 045b6355b781..6f7d59ac714c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -55,7 +55,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index a516c9ff40ea..7d0a781eb190 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -539,7 +539,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/gc.yml b/.github/workflows/gc.yml index e343cb3528c1..2d3f5f703683 100644 --- a/.github/workflows/gc.yml +++ b/.github/workflows/gc.yml @@ -53,7 +53,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index 4b5937a7c40f..7d6a6747a086 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -48,7 +48,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/ltpfs.yml b/.github/workflows/ltpfs.yml index 8f30986dff50..b150a5ee9d9c 100644 --- a/.github/workflows/ltpfs.yml +++ b/.github/workflows/ltpfs.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/ltpsyscallshead.yml b/.github/workflows/ltpsyscallshead.yml index f6cd003a7abc..bdd85568f738 100644 --- a/.github/workflows/ltpsyscallshead.yml +++ b/.github/workflows/ltpsyscallshead.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/ltpsyscallsmiddle.yml b/.github/workflows/ltpsyscallsmiddle.yml index 70a3e00e276f..eb7d9a3c42ad 100644 --- a/.github/workflows/ltpsyscallsmiddle.yml +++ b/.github/workflows/ltpsyscallsmiddle.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/ltpsyscallstail.yml b/.github/workflows/ltpsyscallstail.yml index 6133c4992e06..34cc9a032bfe 100644 --- a/.github/workflows/ltpsyscallstail.yml +++ b/.github/workflows/ltpsyscallstail.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/mdtest.yml b/.github/workflows/mdtest.yml index d7fd1df33b34..52031ec6818e 100644 --- a/.github/workflows/mdtest.yml +++ b/.github/workflows/mdtest.yml @@ -52,7 +52,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/mongodb_mmap.yml b/.github/workflows/mongodb_mmap.yml index d679c77cb3d4..b3e649813b60 100644 --- a/.github/workflows/mongodb_mmap.yml +++ b/.github/workflows/mongodb_mmap.yml @@ -49,7 +49,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/mysqltest_bigtable.yml b/.github/workflows/mysqltest_bigtable.yml index b73e2ecb1de8..c42f5e057129 100644 --- a/.github/workflows/mysqltest_bigtable.yml +++ b/.github/workflows/mysqltest_bigtable.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/mysqltest_smalltable.yml b/.github/workflows/mysqltest_smalltable.yml index 0d16220cc9bd..26db0a492404 100644 --- a/.github/workflows/mysqltest_smalltable.yml +++ b/.github/workflows/mysqltest_smalltable.yml @@ -45,7 +45,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/pjdfstest.yml b/.github/workflows/pjdfstest.yml index ac83c4b562f6..9e9f42279dc6 100644 --- a/.github/workflows/pjdfstest.yml +++ b/.github/workflows/pjdfstest.yml @@ -52,7 +52,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/redis_compile.yml b/.github/workflows/redis_compile.yml index c8cec8235f29..1b727dad5daa 100644 --- a/.github/workflows/redis_compile.yml +++ b/.github/workflows/redis_compile.yml @@ -42,7 +42,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/sdktest.yml b/.github/workflows/sdktest.yml index 9e4f43af1ba6..b390460ff3fa 100644 --- a/.github/workflows/sdktest.yml +++ b/.github/workflows/sdktest.yml @@ -50,7 +50,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index f25aaed3f059..8e93bb5decc3 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -53,7 +53,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs @@ -188,7 +188,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/tpcds.yml b/.github/workflows/tpcds.yml index b11daad8bbcb..c580bcfdfbde 100644 --- a/.github/workflows/tpcds.yml +++ b/.github/workflows/tpcds.yml @@ -63,7 +63,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 5db1072c2079..72770b1cbe91 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -70,7 +70,7 @@ jobs: run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-server_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb foundationdb-server_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb foundationdb-server_6.3.24-1_amd64.deb - name: Download Zip run: | diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index cbdf9de74763..a50c0dec749b 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -31,7 +31,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -57,7 +57,7 @@ jobs: - name: Install Fdb C Lib run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: From 6ce4300a7e900b712e92eec9f7e5ad7e7d475d40 Mon Sep 17 00:00:00 2001 From: yfeng Date: Mon, 19 Sep 2022 00:22:10 +0800 Subject: [PATCH 06/10] fdb : change version for foundationdb --- .github/workflows/unittests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 72770b1cbe91..a61764c20329 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -70,7 +70,7 @@ jobs: run: | wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-server_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb foundationdb-server_6.3.24-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb foundationdb-server_6.3.23-1_amd64.deb - name: Download Zip run: | From accc3b459cbf0eb3f94b3a99eb3c78a77312ba80 Mon Sep 17 00:00:00 2001 From: yfeng Date: Mon, 19 Sep 2022 23:05:50 +0800 Subject: [PATCH 07/10] fdb : remove fdb cli --- .github/actions/clickhouse/action.yml | 6 ------ .github/actions/fio/action.yml | 6 ------ .github/actions/gateway/action.yml | 5 ----- .github/actions/load/action.yml | 6 ------ .github/actions/rmr/action.yml | 5 ----- .github/actions/sysbenchrndrw/action.yml | 5 ----- .github/actions/sysbenchseqrw/action.yml | 6 ------ .github/actions/vdbench/action.yml | 6 ------ .github/actions/version-compatible/action.yml | 5 ----- .github/workflows/aitests.yml | 5 ----- .github/workflows/aitests_limitcache.yml | 5 ----- .github/workflows/config.yml | 4 ---- .github/workflows/elastictest.yml | 5 ----- .github/workflows/encoding_mysql.yml | 5 ----- .github/workflows/format.yml | 5 ----- .github/workflows/gateway.yml | 5 ----- .github/workflows/gc.yml | 5 ----- .github/workflows/integrationtests.yml | 4 ---- .github/workflows/ltpfs.yml | 5 ----- .github/workflows/ltpsyscallshead.yml | 4 ---- .github/workflows/ltpsyscallsmiddle.yml | 5 ----- .github/workflows/ltpsyscallstail.yml | 5 ----- .github/workflows/mdtest.yml | 5 ----- .github/workflows/mongodb_mmap.yml | 5 ----- .github/workflows/mysqltest_bigtable.yml | 5 ----- .github/workflows/mysqltest_smalltable.yml | 5 ----- .github/workflows/pjdfstest.yml | 5 ----- .github/workflows/redis_compile.yml | 5 ----- .github/workflows/sdktest.yml | 5 ----- .github/workflows/sync.yml | 9 --------- .github/workflows/tpcds.yml | 5 ----- .github/workflows/verify.yml | 9 --------- 32 files changed, 170 deletions(-) diff --git a/.github/actions/clickhouse/action.yml b/.github/actions/clickhouse/action.yml index f0708ad8a25a..f0f37dc2e56b 100644 --- a/.github/actions/clickhouse/action.yml +++ b/.github/actions/clickhouse/action.yml @@ -26,12 +26,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target shell: bash run: make juicefs diff --git a/.github/actions/fio/action.yml b/.github/actions/fio/action.yml index f8ba5ff59e69..806b822e9795 100644 --- a/.github/actions/fio/action.yml +++ b/.github/actions/fio/action.yml @@ -77,12 +77,6 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/gateway/action.yml b/.github/actions/gateway/action.yml index 7e4d93b07f61..e7d2d2b8e9e9 100644 --- a/.github/actions/gateway/action.yml +++ b/.github/actions/gateway/action.yml @@ -51,11 +51,6 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/load/action.yml b/.github/actions/load/action.yml index 3b4f8f7a0d88..5bd93178abf5 100644 --- a/.github/actions/load/action.yml +++ b/.github/actions/load/action.yml @@ -27,12 +27,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/actions/rmr/action.yml b/.github/actions/rmr/action.yml index 19bd5fabdeea..233554cf3250 100644 --- a/.github/actions/rmr/action.yml +++ b/.github/actions/rmr/action.yml @@ -30,11 +30,6 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/sysbenchrndrw/action.yml b/.github/actions/sysbenchrndrw/action.yml index effc84593c9c..c811cae555e8 100644 --- a/.github/actions/sysbenchrndrw/action.yml +++ b/.github/actions/sysbenchrndrw/action.yml @@ -25,11 +25,6 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target shell: bash diff --git a/.github/actions/sysbenchseqrw/action.yml b/.github/actions/sysbenchseqrw/action.yml index 2dd1170e6451..8e149fba2bc8 100644 --- a/.github/actions/sysbenchseqrw/action.yml +++ b/.github/actions/sysbenchseqrw/action.yml @@ -26,12 +26,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target shell: bash run: make juicefs diff --git a/.github/actions/vdbench/action.yml b/.github/actions/vdbench/action.yml index d318f8ba58ba..1a5eef345727 100644 --- a/.github/actions/vdbench/action.yml +++ b/.github/actions/vdbench/action.yml @@ -74,12 +74,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target shell: bash run: | diff --git a/.github/actions/version-compatible/action.yml b/.github/actions/version-compatible/action.yml index fa1b88aeed78..0c2e7ba4fdd4 100644 --- a/.github/actions/version-compatible/action.yml +++ b/.github/actions/version-compatible/action.yml @@ -41,11 +41,6 @@ runs: with: go-version: '1.18.x' - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/aitests.yml b/.github/workflows/aitests.yml index 2eb6a252a8da..e4e06661d7a1 100644 --- a/.github/workflows/aitests.yml +++ b/.github/workflows/aitests.yml @@ -43,11 +43,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/aitests_limitcache.yml b/.github/workflows/aitests_limitcache.yml index 6d917612baaa..cc47af3bb33c 100644 --- a/.github/workflows/aitests_limitcache.yml +++ b/.github/workflows/aitests_limitcache.yml @@ -43,11 +43,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 2d874b2ac7c4..e94427927750 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -53,10 +53,6 @@ jobs: with: go-version: '1.18.x' - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/elastictest.yml b/.github/workflows/elastictest.yml index 4465347e1645..c3b4cc016838 100644 --- a/.github/workflows/elastictest.yml +++ b/.github/workflows/elastictest.yml @@ -42,11 +42,6 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/encoding_mysql.yml b/.github/workflows/encoding_mysql.yml index 13f0755e73d4..f722237c333e 100644 --- a/.github/workflows/encoding_mysql.yml +++ b/.github/workflows/encoding_mysql.yml @@ -49,11 +49,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | url=https://github.com/juicedata/juicefs/releases/download/v1.0.0-beta2/juicefs-1.0.0-beta2-linux-amd64.tar.gz diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 6f7d59ac714c..057e158d8230 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -52,11 +52,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index 7d0a781eb190..1aff319be70e 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -535,11 +535,6 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/gc.yml b/.github/workflows/gc.yml index 2d3f5f703683..d4f680e0b11b 100644 --- a/.github/workflows/gc.yml +++ b/.github/workflows/gc.yml @@ -50,11 +50,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index 7d6a6747a086..6b7e773934bb 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -45,10 +45,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/ltpfs.yml b/.github/workflows/ltpfs.yml index b150a5ee9d9c..c7dd5162aa83 100644 --- a/.github/workflows/ltpfs.yml +++ b/.github/workflows/ltpfs.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallshead.yml b/.github/workflows/ltpsyscallshead.yml index bdd85568f738..23e98f88eacc 100644 --- a/.github/workflows/ltpsyscallshead.yml +++ b/.github/workflows/ltpsyscallshead.yml @@ -42,10 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/ltpsyscallsmiddle.yml b/.github/workflows/ltpsyscallsmiddle.yml index eb7d9a3c42ad..63a883d0f447 100644 --- a/.github/workflows/ltpsyscallsmiddle.yml +++ b/.github/workflows/ltpsyscallsmiddle.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallstail.yml b/.github/workflows/ltpsyscallstail.yml index 34cc9a032bfe..aa657a5a19d7 100644 --- a/.github/workflows/ltpsyscallstail.yml +++ b/.github/workflows/ltpsyscallstail.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/mdtest.yml b/.github/workflows/mdtest.yml index 52031ec6818e..677d38d0867c 100644 --- a/.github/workflows/mdtest.yml +++ b/.github/workflows/mdtest.yml @@ -49,11 +49,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | export GOPATH=/usr/local/go diff --git a/.github/workflows/mongodb_mmap.yml b/.github/workflows/mongodb_mmap.yml index b3e649813b60..9a18826f8f3a 100644 --- a/.github/workflows/mongodb_mmap.yml +++ b/.github/workflows/mongodb_mmap.yml @@ -46,11 +46,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/mysqltest_bigtable.yml b/.github/workflows/mysqltest_bigtable.yml index c42f5e057129..40802f8d85c3 100644 --- a/.github/workflows/mysqltest_bigtable.yml +++ b/.github/workflows/mysqltest_bigtable.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/mysqltest_smalltable.yml b/.github/workflows/mysqltest_smalltable.yml index 26db0a492404..1b8da2a57897 100644 --- a/.github/workflows/mysqltest_smalltable.yml +++ b/.github/workflows/mysqltest_smalltable.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/pjdfstest.yml b/.github/workflows/pjdfstest.yml index 9e9f42279dc6..e3a34df7b8b9 100644 --- a/.github/workflows/pjdfstest.yml +++ b/.github/workflows/pjdfstest.yml @@ -49,11 +49,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/redis_compile.yml b/.github/workflows/redis_compile.yml index 1b727dad5daa..270a07cf5a09 100644 --- a/.github/workflows/redis_compile.yml +++ b/.github/workflows/redis_compile.yml @@ -39,11 +39,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/sdktest.yml b/.github/workflows/sdktest.yml index b390460ff3fa..0e72381349d2 100644 --- a/.github/workflows/sdktest.yml +++ b/.github/workflows/sdktest.yml @@ -47,11 +47,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 8e93bb5decc3..22f2ad48fa8d 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -50,11 +50,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs @@ -185,10 +180,6 @@ jobs: with: go-version: '1.18.x' - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/tpcds.yml b/.github/workflows/tpcds.yml index c580bcfdfbde..43c85261df1d 100644 --- a/.github/workflows/tpcds.yml +++ b/.github/workflows/tpcds.yml @@ -59,11 +59,6 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index a50c0dec749b..183fc6f9dfca 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -28,10 +28,6 @@ jobs: go-version: '1.17.x' - uses: actions/checkout@v2 - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -53,11 +49,6 @@ jobs: run: | sudo apt-get update sudo apt-get install g++-multilib gcc-mingw-w64 - - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: From 067520bd77446607ceca138c63afe0601910df26 Mon Sep 17 00:00:00 2001 From: yfeng Date: Tue, 20 Sep 2022 00:35:50 +0800 Subject: [PATCH 08/10] Revert "fdb : remove fdb cli" This reverts commit ada019e0eb7cfada340f342636cc288b984820c9. --- .github/actions/clickhouse/action.yml | 6 ++++++ .github/actions/fio/action.yml | 6 ++++++ .github/actions/gateway/action.yml | 5 +++++ .github/actions/load/action.yml | 6 ++++++ .github/actions/rmr/action.yml | 5 +++++ .github/actions/sysbenchrndrw/action.yml | 5 +++++ .github/actions/sysbenchseqrw/action.yml | 6 ++++++ .github/actions/vdbench/action.yml | 6 ++++++ .github/actions/version-compatible/action.yml | 5 +++++ .github/workflows/aitests.yml | 5 +++++ .github/workflows/aitests_limitcache.yml | 5 +++++ .github/workflows/config.yml | 4 ++++ .github/workflows/elastictest.yml | 5 +++++ .github/workflows/encoding_mysql.yml | 5 +++++ .github/workflows/format.yml | 5 +++++ .github/workflows/gateway.yml | 5 +++++ .github/workflows/gc.yml | 5 +++++ .github/workflows/integrationtests.yml | 4 ++++ .github/workflows/ltpfs.yml | 5 +++++ .github/workflows/ltpsyscallshead.yml | 4 ++++ .github/workflows/ltpsyscallsmiddle.yml | 5 +++++ .github/workflows/ltpsyscallstail.yml | 5 +++++ .github/workflows/mdtest.yml | 5 +++++ .github/workflows/mongodb_mmap.yml | 5 +++++ .github/workflows/mysqltest_bigtable.yml | 5 +++++ .github/workflows/mysqltest_smalltable.yml | 5 +++++ .github/workflows/pjdfstest.yml | 5 +++++ .github/workflows/redis_compile.yml | 5 +++++ .github/workflows/sdktest.yml | 5 +++++ .github/workflows/sync.yml | 9 +++++++++ .github/workflows/tpcds.yml | 5 +++++ .github/workflows/verify.yml | 9 +++++++++ 32 files changed, 170 insertions(+) diff --git a/.github/actions/clickhouse/action.yml b/.github/actions/clickhouse/action.yml index f0f37dc2e56b..f0708ad8a25a 100644 --- a/.github/actions/clickhouse/action.yml +++ b/.github/actions/clickhouse/action.yml @@ -26,6 +26,12 @@ runs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target shell: bash run: make juicefs diff --git a/.github/actions/fio/action.yml b/.github/actions/fio/action.yml index 806b822e9795..f8ba5ff59e69 100644 --- a/.github/actions/fio/action.yml +++ b/.github/actions/fio/action.yml @@ -77,6 +77,12 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/gateway/action.yml b/.github/actions/gateway/action.yml index e7d2d2b8e9e9..7e4d93b07f61 100644 --- a/.github/actions/gateway/action.yml +++ b/.github/actions/gateway/action.yml @@ -51,6 +51,11 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/load/action.yml b/.github/actions/load/action.yml index 5bd93178abf5..3b4f8f7a0d88 100644 --- a/.github/actions/load/action.yml +++ b/.github/actions/load/action.yml @@ -27,6 +27,12 @@ runs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/actions/rmr/action.yml b/.github/actions/rmr/action.yml index 233554cf3250..19bd5fabdeea 100644 --- a/.github/actions/rmr/action.yml +++ b/.github/actions/rmr/action.yml @@ -30,6 +30,11 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/sysbenchrndrw/action.yml b/.github/actions/sysbenchrndrw/action.yml index c811cae555e8..effc84593c9c 100644 --- a/.github/actions/sysbenchrndrw/action.yml +++ b/.github/actions/sysbenchrndrw/action.yml @@ -25,6 +25,11 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target shell: bash diff --git a/.github/actions/sysbenchseqrw/action.yml b/.github/actions/sysbenchseqrw/action.yml index 8e149fba2bc8..2dd1170e6451 100644 --- a/.github/actions/sysbenchseqrw/action.yml +++ b/.github/actions/sysbenchseqrw/action.yml @@ -26,6 +26,12 @@ runs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target shell: bash run: make juicefs diff --git a/.github/actions/vdbench/action.yml b/.github/actions/vdbench/action.yml index 1a5eef345727..d318f8ba58ba 100644 --- a/.github/actions/vdbench/action.yml +++ b/.github/actions/vdbench/action.yml @@ -74,6 +74,12 @@ runs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target shell: bash run: | diff --git a/.github/actions/version-compatible/action.yml b/.github/actions/version-compatible/action.yml index 0c2e7ba4fdd4..fa1b88aeed78 100644 --- a/.github/actions/version-compatible/action.yml +++ b/.github/actions/version-compatible/action.yml @@ -41,6 +41,11 @@ runs: with: go-version: '1.18.x' + - name: Install Fdb C Lib + shell: bash + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/aitests.yml b/.github/workflows/aitests.yml index e4e06661d7a1..2eb6a252a8da 100644 --- a/.github/workflows/aitests.yml +++ b/.github/workflows/aitests.yml @@ -43,6 +43,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/aitests_limitcache.yml b/.github/workflows/aitests_limitcache.yml index cc47af3bb33c..6d917612baaa 100644 --- a/.github/workflows/aitests_limitcache.yml +++ b/.github/workflows/aitests_limitcache.yml @@ -43,6 +43,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index e94427927750..2d874b2ac7c4 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -53,6 +53,10 @@ jobs: with: go-version: '1.18.x' + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/elastictest.yml b/.github/workflows/elastictest.yml index c3b4cc016838..4465347e1645 100644 --- a/.github/workflows/elastictest.yml +++ b/.github/workflows/elastictest.yml @@ -42,6 +42,11 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/encoding_mysql.yml b/.github/workflows/encoding_mysql.yml index f722237c333e..13f0755e73d4 100644 --- a/.github/workflows/encoding_mysql.yml +++ b/.github/workflows/encoding_mysql.yml @@ -49,6 +49,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | url=https://github.com/juicedata/juicefs/releases/download/v1.0.0-beta2/juicefs-1.0.0-beta2-linux-amd64.tar.gz diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 057e158d8230..6f7d59ac714c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -52,6 +52,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index 1aff319be70e..7d0a781eb190 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -535,6 +535,11 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/gc.yml b/.github/workflows/gc.yml index d4f680e0b11b..2d3f5f703683 100644 --- a/.github/workflows/gc.yml +++ b/.github/workflows/gc.yml @@ -50,6 +50,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index 6b7e773934bb..7d6a6747a086 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -45,6 +45,10 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/ltpfs.yml b/.github/workflows/ltpfs.yml index c7dd5162aa83..b150a5ee9d9c 100644 --- a/.github/workflows/ltpfs.yml +++ b/.github/workflows/ltpfs.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallshead.yml b/.github/workflows/ltpsyscallshead.yml index 23e98f88eacc..bdd85568f738 100644 --- a/.github/workflows/ltpsyscallshead.yml +++ b/.github/workflows/ltpsyscallshead.yml @@ -42,6 +42,10 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/workflows/ltpsyscallsmiddle.yml b/.github/workflows/ltpsyscallsmiddle.yml index 63a883d0f447..eb7d9a3c42ad 100644 --- a/.github/workflows/ltpsyscallsmiddle.yml +++ b/.github/workflows/ltpsyscallsmiddle.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallstail.yml b/.github/workflows/ltpsyscallstail.yml index aa657a5a19d7..34cc9a032bfe 100644 --- a/.github/workflows/ltpsyscallstail.yml +++ b/.github/workflows/ltpsyscallstail.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/mdtest.yml b/.github/workflows/mdtest.yml index 677d38d0867c..52031ec6818e 100644 --- a/.github/workflows/mdtest.yml +++ b/.github/workflows/mdtest.yml @@ -49,6 +49,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | export GOPATH=/usr/local/go diff --git a/.github/workflows/mongodb_mmap.yml b/.github/workflows/mongodb_mmap.yml index 9a18826f8f3a..b3e649813b60 100644 --- a/.github/workflows/mongodb_mmap.yml +++ b/.github/workflows/mongodb_mmap.yml @@ -46,6 +46,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/mysqltest_bigtable.yml b/.github/workflows/mysqltest_bigtable.yml index 40802f8d85c3..c42f5e057129 100644 --- a/.github/workflows/mysqltest_bigtable.yml +++ b/.github/workflows/mysqltest_bigtable.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/mysqltest_smalltable.yml b/.github/workflows/mysqltest_smalltable.yml index 1b8da2a57897..26db0a492404 100644 --- a/.github/workflows/mysqltest_smalltable.yml +++ b/.github/workflows/mysqltest_smalltable.yml @@ -42,6 +42,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/pjdfstest.yml b/.github/workflows/pjdfstest.yml index e3a34df7b8b9..9e9f42279dc6 100644 --- a/.github/workflows/pjdfstest.yml +++ b/.github/workflows/pjdfstest.yml @@ -49,6 +49,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/redis_compile.yml b/.github/workflows/redis_compile.yml index 270a07cf5a09..1b727dad5daa 100644 --- a/.github/workflows/redis_compile.yml +++ b/.github/workflows/redis_compile.yml @@ -39,6 +39,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: make juicefs diff --git a/.github/workflows/sdktest.yml b/.github/workflows/sdktest.yml index 0e72381349d2..b390460ff3fa 100644 --- a/.github/workflows/sdktest.yml +++ b/.github/workflows/sdktest.yml @@ -47,6 +47,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: | make juicefs diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 22f2ad48fa8d..8e93bb5decc3 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -50,6 +50,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + - name: Build linux target run: make juicefs @@ -180,6 +185,10 @@ jobs: with: go-version: '1.18.x' + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/tpcds.yml b/.github/workflows/tpcds.yml index 43c85261df1d..c580bcfdfbde 100644 --- a/.github/workflows/tpcds.yml +++ b/.github/workflows/tpcds.yml @@ -59,6 +59,11 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: make juicefs diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 183fc6f9dfca..a50c0dec749b 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -28,6 +28,10 @@ jobs: go-version: '1.17.x' - uses: actions/checkout@v2 + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -49,6 +53,11 @@ jobs: run: | sudo apt-get update sudo apt-get install g++-multilib gcc-mingw-w64 + + - name: Install Fdb C Lib + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: From ee6df243b19df1546043c650bc90ddc2c1ab08dd Mon Sep 17 00:00:00 2001 From: yfeng Date: Tue, 20 Sep 2022 14:29:16 +0800 Subject: [PATCH 09/10] Fixed some issues with foundationdb meta engine compilation --- .github/actions/clickhouse/action.yml | 6 --- .github/actions/fio/action.yml | 6 --- .github/actions/gateway/action.yml | 5 --- .github/actions/load/action.yml | 6 --- .github/actions/rmr/action.yml | 5 --- .github/actions/sysbenchrndrw/action.yml | 5 --- .github/actions/sysbenchseqrw/action.yml | 6 --- .github/actions/vdbench/action.yml | 6 --- .github/actions/version-compatible/action.yml | 6 --- .github/workflows/aitests.yml | 5 --- .github/workflows/aitests_limitcache.yml | 5 --- .github/workflows/config.yml | 5 --- .github/workflows/elastictest.yml | 5 --- .github/workflows/encoding_mysql.yml | 5 --- .github/workflows/format.yml | 5 --- .github/workflows/gateway.yml | 5 --- .github/workflows/gc.yml | 5 --- .github/workflows/integrationtests.yml | 5 --- .github/workflows/ltpfs.yml | 5 --- .github/workflows/ltpsyscallshead.yml | 5 --- .github/workflows/ltpsyscallsmiddle.yml | 5 --- .github/workflows/ltpsyscallstail.yml | 5 --- .github/workflows/mdtest.yml | 5 --- .github/workflows/mongodb_mmap.yml | 5 --- .github/workflows/mysqltest_bigtable.yml | 5 --- .github/workflows/mysqltest_smalltable.yml | 5 --- .github/workflows/pjdfstest.yml | 5 --- .github/workflows/redis_compile.yml | 5 --- .github/workflows/sdktest.yml | 5 --- .github/workflows/sync.yml | 10 ----- .github/workflows/tpcds.yml | 5 --- .github/workflows/unittests.yml | 12 +++--- .github/workflows/verify.yml | 19 ++++----- Makefile | 7 +++- pkg/meta/benchmarks_test.go | 3 +- pkg/meta/tkv_fdb.go | 4 +- pkg/meta/tkv_fdb_test.go | 41 +++++++++++++++++++ pkg/meta/tkv_mem.go | 3 -- pkg/meta/tkv_test.go | 8 ---- 39 files changed, 63 insertions(+), 200 deletions(-) create mode 100644 pkg/meta/tkv_fdb_test.go diff --git a/.github/actions/clickhouse/action.yml b/.github/actions/clickhouse/action.yml index f0708ad8a25a..f0f37dc2e56b 100644 --- a/.github/actions/clickhouse/action.yml +++ b/.github/actions/clickhouse/action.yml @@ -26,12 +26,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target shell: bash run: make juicefs diff --git a/.github/actions/fio/action.yml b/.github/actions/fio/action.yml index f8ba5ff59e69..fead90b3f5c9 100644 --- a/.github/actions/fio/action.yml +++ b/.github/actions/fio/action.yml @@ -78,12 +78,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/actions/gateway/action.yml b/.github/actions/gateway/action.yml index 7e4d93b07f61..e7d2d2b8e9e9 100644 --- a/.github/actions/gateway/action.yml +++ b/.github/actions/gateway/action.yml @@ -51,11 +51,6 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/load/action.yml b/.github/actions/load/action.yml index 3b4f8f7a0d88..5bd93178abf5 100644 --- a/.github/actions/load/action.yml +++ b/.github/actions/load/action.yml @@ -27,12 +27,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/actions/rmr/action.yml b/.github/actions/rmr/action.yml index 19bd5fabdeea..233554cf3250 100644 --- a/.github/actions/rmr/action.yml +++ b/.github/actions/rmr/action.yml @@ -30,11 +30,6 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target run: | diff --git a/.github/actions/sysbenchrndrw/action.yml b/.github/actions/sysbenchrndrw/action.yml index effc84593c9c..c811cae555e8 100644 --- a/.github/actions/sysbenchrndrw/action.yml +++ b/.github/actions/sysbenchrndrw/action.yml @@ -25,11 +25,6 @@ runs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - name: Build linux target shell: bash diff --git a/.github/actions/sysbenchseqrw/action.yml b/.github/actions/sysbenchseqrw/action.yml index 2dd1170e6451..8e149fba2bc8 100644 --- a/.github/actions/sysbenchseqrw/action.yml +++ b/.github/actions/sysbenchseqrw/action.yml @@ -26,12 +26,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target shell: bash run: make juicefs diff --git a/.github/actions/vdbench/action.yml b/.github/actions/vdbench/action.yml index d318f8ba58ba..1a5eef345727 100644 --- a/.github/actions/vdbench/action.yml +++ b/.github/actions/vdbench/action.yml @@ -74,12 +74,6 @@ runs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target shell: bash run: | diff --git a/.github/actions/version-compatible/action.yml b/.github/actions/version-compatible/action.yml index fa1b88aeed78..03c89c49ff9b 100644 --- a/.github/actions/version-compatible/action.yml +++ b/.github/actions/version-compatible/action.yml @@ -41,12 +41,6 @@ runs: with: go-version: '1.18.x' - - name: Install Fdb C Lib - shell: bash - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/aitests.yml b/.github/workflows/aitests.yml index 2eb6a252a8da..e4e06661d7a1 100644 --- a/.github/workflows/aitests.yml +++ b/.github/workflows/aitests.yml @@ -43,11 +43,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/aitests_limitcache.yml b/.github/workflows/aitests_limitcache.yml index 6d917612baaa..cc47af3bb33c 100644 --- a/.github/workflows/aitests_limitcache.yml +++ b/.github/workflows/aitests_limitcache.yml @@ -43,11 +43,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 2d874b2ac7c4..cb0df1888e76 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -52,11 +52,6 @@ jobs: uses: actions/setup-go@v2 with: go-version: '1.18.x' - - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/elastictest.yml b/.github/workflows/elastictest.yml index 4465347e1645..47f4e5b95c39 100644 --- a/.github/workflows/elastictest.yml +++ b/.github/workflows/elastictest.yml @@ -43,11 +43,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/encoding_mysql.yml b/.github/workflows/encoding_mysql.yml index 13f0755e73d4..f722237c333e 100644 --- a/.github/workflows/encoding_mysql.yml +++ b/.github/workflows/encoding_mysql.yml @@ -49,11 +49,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | url=https://github.com/juicedata/juicefs/releases/download/v1.0.0-beta2/juicefs-1.0.0-beta2-linux-amd64.tar.gz diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 6f7d59ac714c..057e158d8230 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -52,11 +52,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index 7d0a781eb190..8b9af4546ed0 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -536,11 +536,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/gc.yml b/.github/workflows/gc.yml index 2d3f5f703683..d4f680e0b11b 100644 --- a/.github/workflows/gc.yml +++ b/.github/workflows/gc.yml @@ -50,11 +50,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index 7d6a6747a086..13eabd794311 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -45,11 +45,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpfs.yml b/.github/workflows/ltpfs.yml index b150a5ee9d9c..c7dd5162aa83 100644 --- a/.github/workflows/ltpfs.yml +++ b/.github/workflows/ltpfs.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallshead.yml b/.github/workflows/ltpsyscallshead.yml index bdd85568f738..5a3565788420 100644 --- a/.github/workflows/ltpsyscallshead.yml +++ b/.github/workflows/ltpsyscallshead.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallsmiddle.yml b/.github/workflows/ltpsyscallsmiddle.yml index eb7d9a3c42ad..63a883d0f447 100644 --- a/.github/workflows/ltpsyscallsmiddle.yml +++ b/.github/workflows/ltpsyscallsmiddle.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/ltpsyscallstail.yml b/.github/workflows/ltpsyscallstail.yml index 34cc9a032bfe..aa657a5a19d7 100644 --- a/.github/workflows/ltpsyscallstail.yml +++ b/.github/workflows/ltpsyscallstail.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/mdtest.yml b/.github/workflows/mdtest.yml index 52031ec6818e..677d38d0867c 100644 --- a/.github/workflows/mdtest.yml +++ b/.github/workflows/mdtest.yml @@ -49,11 +49,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | export GOPATH=/usr/local/go diff --git a/.github/workflows/mongodb_mmap.yml b/.github/workflows/mongodb_mmap.yml index b3e649813b60..9a18826f8f3a 100644 --- a/.github/workflows/mongodb_mmap.yml +++ b/.github/workflows/mongodb_mmap.yml @@ -46,11 +46,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/mysqltest_bigtable.yml b/.github/workflows/mysqltest_bigtable.yml index c42f5e057129..40802f8d85c3 100644 --- a/.github/workflows/mysqltest_bigtable.yml +++ b/.github/workflows/mysqltest_bigtable.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/mysqltest_smalltable.yml b/.github/workflows/mysqltest_smalltable.yml index 26db0a492404..1b8da2a57897 100644 --- a/.github/workflows/mysqltest_smalltable.yml +++ b/.github/workflows/mysqltest_smalltable.yml @@ -42,11 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/pjdfstest.yml b/.github/workflows/pjdfstest.yml index 9e9f42279dc6..e3a34df7b8b9 100644 --- a/.github/workflows/pjdfstest.yml +++ b/.github/workflows/pjdfstest.yml @@ -49,11 +49,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/redis_compile.yml b/.github/workflows/redis_compile.yml index 1b727dad5daa..270a07cf5a09 100644 --- a/.github/workflows/redis_compile.yml +++ b/.github/workflows/redis_compile.yml @@ -39,11 +39,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/sdktest.yml b/.github/workflows/sdktest.yml index b390460ff3fa..0e72381349d2 100644 --- a/.github/workflows/sdktest.yml +++ b/.github/workflows/sdktest.yml @@ -47,11 +47,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: | make juicefs diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 8e93bb5decc3..74d84567c1a1 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -50,11 +50,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs @@ -184,11 +179,6 @@ jobs: uses: actions/setup-go@v2 with: go-version: '1.18.x' - - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: diff --git a/.github/workflows/tpcds.yml b/.github/workflows/tpcds.yml index c580bcfdfbde..d0259d4e1270 100644 --- a/.github/workflows/tpcds.yml +++ b/.github/workflows/tpcds.yml @@ -60,11 +60,6 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: Build linux target run: make juicefs diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index a61764c20329..c7bbc7582c34 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -66,11 +66,6 @@ jobs: sudo apt install -y attr sudo mkdir -p /home/travis/.m2/ - - name: Install FoundationDB - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-server_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb foundationdb-server_6.3.23-1_amd64.deb - name: Download Zip run: | @@ -78,6 +73,8 @@ jobs: wget -O /home/travis/.m2/rclone-v1.57.0-linux-amd64.zip --no-check-certificate https://downloads.rclone.org/v1.57.0/rclone-v1.57.0-linux-amd64.zip wget -O /home/travis/.m2/litmus-0.13.tar.gz http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz wget -O /home/travis/.m2/etcd-v3.5.2-linux-amd64.tar.gz https://github.com/etcd-io/etcd/releases/download/v3.5.2/etcd-v3.5.2-linux-amd64.tar.gz + wget -O /home/travis/.m2/foundationdb-clients_6.3.23-1_amd64.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + wget -O /home/travis/.m2/foundationdb-server_6.3.23-1_amd64.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-server_6.3.23-1_amd64.deb unzip /home/travis/.m2/rclone-v1.57.0-linux-amd64.zip -d /home/travis/.m2/ tar -zxvf /home/travis/.m2/litmus-0.13.tar.gz -C /home/travis/.m2/ cd /home/travis/.m2/litmus-0.13/ && ./configure && make && cd - @@ -103,6 +100,7 @@ jobs: source /home/runner/.bash_profile tiup -v nohup tiup playground --mode tikv-slim >> output.log 2>&1 & + sudo dpkg -i /home/travis/.m2/foundationdb-clients_6.3.23-1_amd64.deb /home/travis/.m2/foundationdb-server_6.3.23-1_amd64.deb docker run -d -p 9000:9000 -p 9001:9001 -e "MINIO_ROOT_USER=testUser" -e "MINIO_ROOT_PASSWORD=testUserPassword" quay.io/minio/minio:RELEASE.2022-01-25T19-56-04Z server /data --console-address ":9001" go install github.com/minio/mc@RELEASE.2022-01-07T06-01-38Z && mc config host add local http://127.0.0.1:9000 testUser testUserPassword && mc mb local/testbucket nohup /home/travis/.m2/rclone-v1.57.0-linux-amd64/rclone serve webdav local --addr 127.0.0.1:9007 >> rclone.log 2>&1 & @@ -114,7 +112,7 @@ jobs: chmod +x travis-setup-hdfs.sh sudo lsof -i :8020 || true ./travis-setup-hdfs.sh - for i in {2222,3306,5432,8020,9000,9007} ; do echo "lsof port:"$i;sudo lsof -i :$i;if [ $? != 0 ];then sleep 5; else continue; fi;sudo lsof -i :$i; if [ $? != 0 ];then echo "service not ready, port:"$i; exit 1;fi; done + for i in {2222,3306,5432,8020,9000,9007,4500} ; do echo "lsof port:"$i;sudo lsof -i :$i;if [ $? != 0 ];then sleep 5; else continue; fi;sudo lsof -i :$i; if [ $? != 0 ];then echo "service not ready, port:"$i; exit 1;fi; done sudo lsof -i :2379;if [ $? != 0 ];then echo "tikv is not ready";cat output.log;exit 1; fi @@ -125,6 +123,8 @@ jobs: make test cat cov1.out >> coverage.txt cat cov2.out >> coverage.txt + make test.fdb + cat cov3.out >> coverage.txt sudo ./juicefs umount /jfs || sudo lsof /jfs && sudo ./juicefs umount --force /jfs || true sudo ./juicefs gc localhost sudo ./juicefs fsck localhost diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index a50c0dec749b..fa3b1bf5707e 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -27,12 +27,6 @@ jobs: with: go-version: '1.17.x' - uses: actions/checkout@v2 - - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -53,11 +47,6 @@ jobs: run: | sudo apt-get update sudo apt-get install g++-multilib gcc-mingw-w64 - - - name: Install Fdb C Lib - run: | - wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb - sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb - uses: actions/cache@v3 with: @@ -84,4 +73,10 @@ jobs: run: | sudo apt-get update sudo apt-get install librados-dev - GOPATH=$HOME/go make juicefs.ceph \ No newline at end of file + GOPATH=$HOME/go make juicefs.ceph + + - name: build fdb + run: | + wget https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb + sudo dpkg -i foundationdb-clients_6.3.23-1_amd64.deb + GOPATH=$HOME/go make juicefs.fdb \ No newline at end of file diff --git a/Makefile b/Makefile index b6ac3f948c31..c259dc6ea0c1 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,14 @@ juicefs: Makefile cmd/*.go pkg/*/*.go go.* go build -ldflags="$(LDFLAGS)" -o juicefs . juicefs.lite: Makefile cmd/*.go pkg/*/*.go - go build -tags nogateway,nowebdav,nocos,nobos,nohdfs,noibmcos,noobs,nooss,noqingstor,noscs,nosftp,noswift,noupyun,noazure,nogs,noufile,nob2,nosqlite,nomysql,nopg,notikv,nobadger,noetcd,nofdb \ + go build -tags nogateway,nowebdav,nocos,nobos,nohdfs,noibmcos,noobs,nooss,noqingstor,noscs,nosftp,noswift,noupyun,noazure,nogs,noufile,nob2,nosqlite,nomysql,nopg,notikv,nobadger,noetcd \ -ldflags="$(LDFLAGS)" -o juicefs.lite . juicefs.ceph: Makefile cmd/*.go pkg/*/*.go go build -tags ceph -ldflags="$(LDFLAGS)" -o juicefs.ceph . +juicefs.fdb: Makefile cmd/*.go pkg/*/*.go + go build -tags fdb -ldflags="$(LDFLAGS)" -o juicefs.fdb . # This is the script for compiling the Linux version on the MacOS platform. # Please execute the `brew install FiloSottile/musl-cross/musl-cross` command before using it. @@ -71,3 +73,6 @@ release: test: go test -v -cover -count=1 -timeout=8m ./pkg/... -coverprofile=cov1.out sudo JFS_GC_SKIPPEDTIME=1 MINIO_ACCESS_KEY=testUser MINIO_SECRET_KEY=testUserPassword go test -v -count=1 -cover -timeout=8m ./cmd/... -coverprofile=cov2.out -coverpkg=./pkg/...,./cmd/... + +test.fdb: + go test -v -cover -count=1 -timeout=8m ./pkg/meta/ -tags fdb -run=TestFdb -coverprofile=cov3.out \ No newline at end of file diff --git a/pkg/meta/benchmarks_test.go b/pkg/meta/benchmarks_test.go index 7833e349f666..c88c757d5200 100644 --- a/pkg/meta/benchmarks_test.go +++ b/pkg/meta/benchmarks_test.go @@ -30,8 +30,7 @@ const ( sqlAddr = "sqlite3://juicefs.db" // sqlAddr = "mysql://root:@/juicefs" // MySQL // sqlAddr = "mysql://root:@tcp(127.0.0.1:4000)/juicefs" // TiDB - tkvAddr = "fdb:///etc/foundationdb/fdb.cluster:fdb_test" - // tkvAddr = "badger://test_db" + tkvAddr = "badger://test_db" // tkvAddr = "tikv://127.0.0.1:2379/juicefs" ) diff --git a/pkg/meta/tkv_fdb.go b/pkg/meta/tkv_fdb.go index 470f3b612675..79a8f645a4b2 100644 --- a/pkg/meta/tkv_fdb.go +++ b/pkg/meta/tkv_fdb.go @@ -1,5 +1,5 @@ -//go:build !nofdb -// +build !nofdb +//go:build fdb +// +build fdb /* * JuiceFS, Copyright 2022 Juicedata, Inc. diff --git a/pkg/meta/tkv_fdb_test.go b/pkg/meta/tkv_fdb_test.go new file mode 100644 index 000000000000..5bd6139a20cd --- /dev/null +++ b/pkg/meta/tkv_fdb_test.go @@ -0,0 +1,41 @@ +//go:build fdb +// +build fdb + +/* + * JuiceFS, Copyright 2022 Juicedata, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//nolint:errcheck +package meta + +import ( + "testing" +) + +func TestFdbClient(t *testing.T) { + m, err := newKVMeta("fdb", "/etc/foundationdb/fdb.cluster:fdb-test2", &Config{}) + if err != nil { + t.Fatalf("create meta: %s", err) + } + testMeta(t, m) +} + +func TestFdb(t *testing.T) { + c, err := newFdbClient("/etc/foundationdb/fdb.cluster:fdb-test1") + if err != nil { + t.Fatal(err) + } + testTKV(t, c) +} diff --git a/pkg/meta/tkv_mem.go b/pkg/meta/tkv_mem.go index cb7299de06ae..869554b3402a 100644 --- a/pkg/meta/tkv_mem.go +++ b/pkg/meta/tkv_mem.go @@ -1,6 +1,3 @@ -//go:build !fdb -// +build !fdb - /* * JuiceFS, Copyright 2021 Juicedata, Inc. * diff --git a/pkg/meta/tkv_test.go b/pkg/meta/tkv_test.go index d075afbf327d..6d18a8445244 100644 --- a/pkg/meta/tkv_test.go +++ b/pkg/meta/tkv_test.go @@ -56,14 +56,6 @@ func TestEtcdClient(t *testing.T) { testMeta(t, m) } -func TestFdbClient(t *testing.T) { - m, err := newKVMeta("fdb", "/etc/foundationdb/fdb.cluster:fdb_test", &Config{}) - if err != nil { - t.Fatalf("create meta: %s", err) - } - testMeta(t, m) -} - func testTKV(t *testing.T, c tkvClient) { txn := func(f func(kt kvTxn)) { if err := c.txn(func(kt kvTxn) error { From b70413bf01c4c3ee9b9254935e57556770210bd9 Mon Sep 17 00:00:00 2001 From: yfeng Date: Tue, 20 Sep 2022 16:11:11 +0800 Subject: [PATCH 10/10] Change the format of prefix in the url of fdb meta engine --- .github/actions/version-compatible/action.yml | 220 ------------------ pkg/meta/tkv_fdb.go | 22 +- pkg/meta/tkv_fdb_test.go | 4 +- 3 files changed, 12 insertions(+), 234 deletions(-) delete mode 100644 .github/actions/version-compatible/action.yml diff --git a/.github/actions/version-compatible/action.yml b/.github/actions/version-compatible/action.yml deleted file mode 100644 index 03c89c49ff9b..000000000000 --- a/.github/actions/version-compatible/action.yml +++ /dev/null @@ -1,220 +0,0 @@ -name: 'Version Compatible' -description: 'Version Compatible action' -inputs: - meta_url: - description: 'meta url' - required: true - default: '' - mount_point: - description: 'mount point' - required: true - default: /tmp/myjfs - volume_name: - description: 'volume name' - required: true - default: myjfs - storage: - description: 'storage' - required: true - default: "minio" - bucket: - description: 'bucket' - required: true - default: "http://127.0.0.1:9000/juicefs-version-compatible" - access_key: - description: 'access key' - required: true - default: "minioadmin" - sercret_key: - description: 'secret key' - required: true - default: "minioadmin" - backward_versions: - description: 'backward versions' - required: true - default: 5 -runs: - using: "composite" - steps: - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: '1.18.x' - - - name: Build linux target - run: | - make juicefs - mv juicefs jfs_new - echo juicefs new version: $(./jfs_new -V) - shell: bash - - - name: create database - shell: bash - run: | - meta_url=${{inputs.meta_url}} - db_name=$(basename $meta_url | awk -F? '{print $1}') - if [[ "$meta_url" == mysql* ]]; then - user=$(echo $meta_url | awk -F/ '{print $3}' | awk -F@ '{print $1}' | awk -F: '{print $1}') - password=$(echo $meta_url | awk -F/ '{print $3}' | awk -F@ '{print $1}' | awk -F: '{print $2}') - test -n "$password" && password="-p$password" || password="" - host=$(basename $(dirname $meta_url) | awk -F@ '{print $2}'| sed 's/(//g' | sed 's/)//g' | awk -F: '{print $1}') - port=$(basename $(dirname $meta_url) | awk -F@ '{print $2}'| sed 's/(//g' | sed 's/)//g' | awk -F: '{print $2}') - test -z "$port" && port="3306" - mysql -u$user $password -h $host -P $port -e "drop database if exists $db_name; create database $db_name;" - elif [[ "$meta_url" == postgres* ]]; then - export PGPASSWORD="postgres" - printf "\set AUTOCOMMIT on\ndrop database if exists $db_name; create database $db_name; " | psql -U postgres -h localhost - fi - - name: Test - shell: bash - run: | - # # Consider command as failed when any component of the pipe fails: - # https://stackoverflow.com/questions/1221833/pipe-output-and-capture-exit-status-in-bash - set -o pipefail - ./mc config host add minio http://127.0.0.1:9000 minioadmin minioadmin - tests=( - "format:jfs_new, format:jfs_old, destroy:jfs_new" - "format:jfs_new, format:jfs_old, destroy:jfs_old" - "format:jfs_old, format:jfs_new, destroy:jfs_old" - "format:jfs_old, format:jfs_new, destroy:jfs_new" - "format:jfs_old, mount:jfs_old, write_file1_100M:jfs_old, umount:jfs_old, dump_backup1:jfs_old, flushmeta:-, load_backup1:jfs_new, config:jfs_new, fsck:jfs_new, mount:jfs_new, read_file1:jfs_new, umount:jfs_new, fsck:jfs_new, destroy:jfs_new " - "format:jfs_old, mount:jfs_old, write_file1_100M:jfs_old, umount:jfs_old, format:jfs_new, mount:jfs_new, read_file1:jfs_new, umount:jfs_new, fsck:jfs_new, destroy:jfs_new" - "format:jfs_old, mount:jfs_old, write_file1_10K:jfs_old, umount:jfs_old, format:jfs_new, mount:jfs_new, read_file1:jfs_new, umount:jfs_new, fsck:jfs_new, destroy:jfs_new" - "format:jfs_old, mount:jfs_old, write_file1_10K:jfs_old, write_file2_10K:jfs_old, umount:jfs_old, dump_backup1:jfs_old, flushmeta:-, load_backup1:jfs_new, config_encrypt:jfs_new, mount:jfs_new, read_file1:jfs_new, read_file2:jfs_new, umount:jfs_new, fsck:jfs_new, destroy:jfs_new " - ) - urls=($(curl -s https://api.github.com/repos/juicedata/juicefs/releases | grep browser_download_url | grep linux-amd64.tar.gz | awk -F\" '{print $4}' | head -${{ inputs.backward_versions }})) - for url in "${urls[@]}"; do - echo download url is: $url - wget -q $url - tar -zxf $(basename $url) - rm $(basename $url) - mv juicefs jfs_old - echo juicefs new version: $(./jfs_new -V) - echo juicefs old version: $(./jfs_old -V) - old_rev=$(./jfs_old -V | awk -F- '{print $1}' | awk -F ' ' '{print $3}') - if [[ "$old_rev" < "1.0.0" ]]; then - echo "Warning: we don't test compatibily for version under 1.0.0" - break - fi - for test in "${tests[@]}"; do - echo 'test is ' $test - echo 'new version is:' $(./jfs_new -V) - echo 'old version is:' $(./jfs_old -V) - IFS=',' read -a command_arr <<< "$test" - for command in "${command_arr[@]}"; do - jfs_bin=$(echo $command | awk -F: '{print $2}'| xargs) - jfs_cmd=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $1}') - echo 'jfs_bin is ' $jfs_bin, "cmd is " $jfs_cmd - case "$jfs_cmd" in - "format") - ./mc admin user remove minio juicedata || true - ./mc admin user add minio juicedata juicedata - ./mc admin policy set minio consoleAdmin user=juicedata - sudo ./$jfs_bin format --trash-days 0 --storage minio --bucket ${{ inputs.bucket }} --access-key juicedata --secret-key juicedata ${{ inputs.meta_url }} juicefs-version-compatible - echo "format finished" - ;; - "mount") - sudo ./$jfs_bin mount --no-usage-report -d ${{ inputs.meta_url }} ${{ inputs.mount_point }} - echo "mount finished" - ;; - "umount") - sudo ./$jfs_bin umount ${{ inputs.mount_point }} - echo "umount finished" - ;; - "destroy") - UUID=$(./$jfs_bin status ${{ inputs.meta_url }} | grep UUID | cut -d '"' -f 4) - if [ -n "$UUID" ];then - echo UUID is $UUID - sudo ./$jfs_bin destroy --force ${{ inputs.meta_url }} $UUID - fi - echo "destroy finished" - ;; - "write") - filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') - size=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $3}') - dd if=/dev/urandom of=${{ inputs.mount_point }}/tempfile iflag=fullblock,count_bytes bs=4k count=$size - md5_write="$filename:$(cat ${{ inputs.mount_point }}/tempfile | md5sum)" - echo "write: filename is: " $filename "md5_write is: " $md5_write - cp ${{inputs.mount_point}}/tempfile ${{ inputs.mount_point }}/$filename - echo "write finished" - ;; - "read") - filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') - read_md5=$(cat ${{ inputs.mount_point }}/$filename | md5sum) - written_filename=$(echo $md5_write | awk -F: '{print $1}') - written_md5=$(echo $md5_write | awk -F: '{print $2}') - echo "read: filename is: " $filename "read_md5 is: " $read_md5, "written_filename is:", $written_filename, "written_md5 is:", $written_md5, - if [ "$filename" == "$wrtten_filename" ] && [ "$read_md5" != "$written_md5" ];then - echo "FATAL: the md5 does not match for: ", $filename, "read_md5:", $read_md5, "written_md5:", $written_md5 - exit 1 - fi - echo "read finished" - ;; - "dump") - filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') - sudo ./$jfs_bin dump ${{ inputs.meta_url }} $filename - echo "dump finished" - ;; - "load") - filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') - echo filename is : $filename - sudo ./$jfs_bin load ${{inputs.meta_url}} $filename - echo "load finished" - ;; - "config") - encrypt=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') - ./mc admin user remove minio juicedata || true - ./mc admin user add minio juicedata juicedata1 - ./mc admin policy set minio consoleAdmin user=juicedata - if [ -n "$encrypt" ]; then - sudo ./$jfs_bin config ${{inputs.meta_url}} --secret-key juicedata1 --encrypt-secret - else - sudo ./$jfs_bin config ${{inputs.meta_url}} --secret-key juicedata1 - fi - sleep 60 - echo "config finished" - ;; - "load") - filename=$(echo $command | awk -F: '{print $1}'| xargs | awk -F_ '{print $2}') - sudo ./$jfs_bin load ${{ inputs.meta_url }} $filename - echo "load finished" - ;; - "status") - sudo ./$jfs_bin status ${{ inputs.meta_url }} - echo "status finished" - ;; - "fsck") - sudo ./$jfs_bin fsck ${{ inputs.meta_url }} - echo "fsck finished" - ;; - "flushmeta") - meta_url=${{inputs.meta_url}} - if [[ "$meta_url" == redis* ]]; then - redis-cli flushall - elif [[ "$meta_url" == mysql* ]]; then - db_name=$(basename $meta_url | awk -F? '{print $1}') - user=$(echo $meta_url | awk -F/ '{print $3}' | awk -F@ '{print $1}' | awk -F: '{print $1}') - password=$(echo $meta_url | awk -F/ '{print $3}' | awk -F@ '{print $1}' | awk -F: '{print $2}') - test -n "$password" && password="-p$password" || password="" - host=$(basename $(dirname $meta_url) | awk -F@ '{print $2}'| sed 's/(//g' | sed 's/)//g' | awk -F: '{print $1}') - port=$(basename $(dirname $meta_url) | awk -F@ '{print $2}'| sed 's/(//g' | sed 's/)//g' | awk -F: '{print $2}') - test -z "$port" && port="3306" - mysql -u$user $password -h $host -P $port -e "drop database if exists $db_name; create database $db_name;" - elif [[ "$meta_url" == postgres* ]]; then - db_name=$(basename $meta_url | awk -F? '{print $1}') - export PGPASSWORD="postgres" - printf "\set AUTOCOMMIT on\ndrop database if exists $db_name; create database $db_name; " | psql -U postgres -h localhost - fi - echo "fsck finished" - ;; - esac - done - done - done - - - name: log - if: ${{ always() }} - shell: bash - run: | - tail -300 /var/log/juicefs.log - grep ":" /var/log/juicefs.log && exit 1 || true \ No newline at end of file diff --git a/pkg/meta/tkv_fdb.go b/pkg/meta/tkv_fdb.go index 79a8f645a4b2..dca04aeda27f 100644 --- a/pkg/meta/tkv_fdb.go +++ b/pkg/meta/tkv_fdb.go @@ -21,9 +21,9 @@ package meta import ( "fmt" - "strings" + "net/url" - fdb "github.com/apple/foundationdb/bindings/go/src/fdb" + "github.com/apple/foundationdb/bindings/go/src/fdb" ) func init() { @@ -39,21 +39,20 @@ type fdbClient struct { client fdb.Database } -func newFdbClient(address string) (tkvClient, error) { - args := strings.Split(address, ":") +func newFdbClient(addr string) (tkvClient, error) { err := fdb.APIVersion(630) if err != nil { return nil, fmt.Errorf("set API version: %s", err) } - db, err := fdb.OpenDatabase(args[0]) + u, err := url.Parse("fdb://" + addr) if err != nil { - return nil, fmt.Errorf("open DataBase Failed: %s", err) + return nil, err } - prefix := "" - if len(args) == 2 { - prefix = args[1] + db, err := fdb.OpenDatabase(u.Path) + if err != nil { + return nil, fmt.Errorf("open database: %s", err) } - return withPrefix(&fdbClient{db}, append([]byte(prefix), 0xFD)), nil + return withPrefix(&fdbClient{db}, append([]byte(u.Query().Get("prefix")), 0xFD)), nil } func (c *fdbClient) name() string { @@ -105,8 +104,7 @@ func (c *fdbClient) shouldRetry(err error) bool { } func (tx *fdbTxn) get(key []byte) []byte { - ret := tx.Get(fdb.Key(key)).MustGet() - return ret + return tx.Get(fdb.Key(key)).MustGet() } func (tx *fdbTxn) gets(keys ...[]byte) [][]byte { diff --git a/pkg/meta/tkv_fdb_test.go b/pkg/meta/tkv_fdb_test.go index 5bd6139a20cd..dbd32fc55c49 100644 --- a/pkg/meta/tkv_fdb_test.go +++ b/pkg/meta/tkv_fdb_test.go @@ -25,7 +25,7 @@ import ( ) func TestFdbClient(t *testing.T) { - m, err := newKVMeta("fdb", "/etc/foundationdb/fdb.cluster:fdb-test2", &Config{}) + m, err := newKVMeta("fdb", "/etc/foundationdb/fdb.cluster?prefix=test2", &Config{}) if err != nil { t.Fatalf("create meta: %s", err) } @@ -33,7 +33,7 @@ func TestFdbClient(t *testing.T) { } func TestFdb(t *testing.T) { - c, err := newFdbClient("/etc/foundationdb/fdb.cluster:fdb-test1") + c, err := newFdbClient("/etc/foundationdb/fdb.cluster?prefix=test1") if err != nil { t.Fatal(err) }