Skip to content

Commit

Permalink
refactor: Decouple decompress read feature from opendal (#1406)
Browse files Browse the repository at this point in the history
* refactor: Decouple decompress read feature from opendal

Signed-off-by: Xuanwo <[email protected]>

* Fix command

Signed-off-by: Xuanwo <[email protected]>

* Remove not used files

Signed-off-by: Xuanwo <[email protected]>

---------

Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Feb 23, 2023
1 parent 9370770 commit 9e2a103
Show file tree
Hide file tree
Showing 33 changed files with 29 additions and 1,296 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Test
run: cargo nextest run --no-fail-fast --features compress,layers-all && cargo test --doc
run: cargo nextest run --no-fail-fast --features layers-all && cargo test --doc
env:
RUST_LOG: DEBUG
RUST_BACKTRACE: full
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_azblob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test azblob --features compress -- --show-output
run: cargo test azblob -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_azdfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test azdfs --features compress -- --show-output
run: cargo test azdfs -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_dashmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test dashmap --features compress,services-dashmap -- --show-output
run: cargo test dashmap --features services-dashmap -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_fs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test fs --features compress -- --show-output
run: cargo test fs -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_ftp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test ftp --features compress,services-ftp -- --show-output
run: cargo test ftp --features services-ftp -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_gcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test gcs --features compress -- --show-output
run: cargo test gcs -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_ghac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Test
shell: bash
run: cargo test ghac --features compress -- --show-output
run: cargo test ghac -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_hdfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Test
shell: bash
continue-on-error: true
run: cargo test hdfs --features compress,services-hdfs -- --show-output
run: cargo test hdfs --features services-hdfs -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/service_test_http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Test
shell: bash
run: cargo test http --features compress -- --show-output
run: cargo test http -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test http --features compress -- --show-output
run: cargo test http -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_ipfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
# - uses: actions/checkout@v3
# - name: Test
# shell: bash
# run: cargo test ipfs --features compress,services-ipfs -- --show-output
# run: cargo test ipfs --features services-ipfs -- --show-output
# env:
# RUST_BACKTRACE: full
# RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_ipmfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test ipmfs --features compress -- --show-output
run: cargo test ipmfs -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_memcached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test memcached --features compress,services-memcached -- --show-output
run: cargo test memcached --features services-memcached -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_memory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test memory --features compress -- --show-output
run: cargo test memory -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_moka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test moka --features compress,services-moka -- --show-output
run: cargo test moka --features services-moka -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_obs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test obs --features compress -- --show-output
run: cargo test obs -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test oss --features compress -- --show-output
run: cargo test oss -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test redis --features compress,services-redis -- --show-output
run: cargo test redis --features services-redis -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_rocksdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test rocksdb --features compress,services-rocksdb -- --show-output --test-threads=1
run: cargo test rocksdb --features services-rocksdb -- --show-output --test-threads=1
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/service_test_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --show-output
run: cargo test s3 -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand All @@ -43,7 +43,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --show-output
run: cargo test s3 -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand All @@ -62,7 +62,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --show-output
run: cargo test s3 -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --show-output
run: cargo test s3 -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --show-output
run: cargo test s3 -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_sled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test sled --features compress,services-sled -- --show-output --test-threads=1
run: cargo test sled --features services-sled -- --show-output --test-threads=1
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/service_test_webdav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Test
shell: bash
run: cargo test webdav --features compress -- --show-output
run: cargo test webdav -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Test empty password
shell: bash
run: cargo test webdav --features compress -- --show-output
run: cargo test webdav -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand All @@ -76,7 +76,7 @@ jobs:

- name: Test with password
shell: bash
run: cargo test webdav --features compress -- --show-output
run: cargo test webdav -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ default = ["rustls"]
# And doesn't have any other effects.
docs = []

# Enable compress support so that users can decompress while reading.
compress = ["async-compression"]
# Enable trust-dns for pure rust dns cache.
trust-dns = ["reqwest/trust-dns", "dep:trust-dns-resolver"]

Expand Down Expand Up @@ -83,11 +81,6 @@ required-features = ["layers-all"]
[dependencies]
anyhow = { version = "1.0.30", features = ["std"] }
async-compat = "0.2"
# Temp workaround, should come back to tagged version after https://github.com/Nemo157/async-compression/issues/150 resolved.
async-compression = { package = "async-compression-issue-150-workaround", version = "0.3.15-issue-150", features = [
"futures-io",
"all-algorithms",
], optional = true }
async-tls = { version = "0.11", optional = true }
async-trait = "0.1.50"
backon = "0.4.0"
Expand Down
1 change: 0 additions & 1 deletion src/docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ default feature is `rustls` which enable rustls support.

## Dependencies Features

- `compress`: Enable object decompress read support.
- `rustls`: Enable TLS functionality provided by `rustls`, enabled by default
- `native-tls`: Enable TLS functionality provided by `native-tls`
- `native-tls-vendored`: Enable the `vendored` feature of `native-tls`
Loading

2 comments on commit 9e2a103

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 9e2a103 Previous: 9370770 Ratio
service_memory_read_full/16.0 MiB 4121699 ns/iter (± 110344) 1787326 ns/iter (± 5505) 2.31

This comment was automatically generated by workflow using github-action-benchmark.

CC: @Xuanwo

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for opendal ready!

✅ Preview
https://opendal-rjwtpdtmm-databend.vercel.app

Built with commit 9e2a103.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.