Skip to content

Commit

Permalink
Merge pull request #2649 from maidsafe/rc-2024.12.1-hotfix7
Browse files Browse the repository at this point in the history
feat: use retry strategy for downloading chunks
  • Loading branch information
jacderida authored Jan 21, 2025
2 parents 92ed942 + 0978816 commit 490eea2
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 11 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

*When editing this file, please respect a line length of 100.*

## 2025-01-21

### Client

#### Changed

- Use balanced retry strategy for downloading chunks. Sometimes it would be possible we wouldn't
find a chunk if we tried to retrieve it on the first attempt, so as with uploads, we will use a
balanced retry strategy for downloads. This should make the `ant file download` command more
robust.

## 2025-01-20

### Client
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ant-build-info/src/release_info.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub const RELEASE_YEAR: &str = "2024";
pub const RELEASE_MONTH: &str = "12";
pub const RELEASE_CYCLE: &str = "1";
pub const RELEASE_CYCLE_COUNTER: &str = "10";
pub const RELEASE_CYCLE_COUNTER: &str = "11";
6 changes: 3 additions & 3 deletions ant-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers <[email protected]>"]
name = "ant-cli"
description = "CLI client for the Autonomi network"
license = "GPL-3.0"
version = "0.3.5"
version = "0.3.6"
edition = "2021"
homepage = "https://maidsafe.net"
readme = "README.md"
Expand All @@ -28,7 +28,7 @@ ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.4" }
ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-logging = { path = "../ant-logging", version = "0.2.45" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
autonomi = { path = "../autonomi", version = "0.3.4", features = [
autonomi = { path = "../autonomi", version = "0.3.5", features = [
"fs",
"vault",
"registers",
Expand Down Expand Up @@ -60,7 +60,7 @@ tracing = { version = "~0.1.26" }
walkdir = "2.5.0"

[dev-dependencies]
autonomi = { path = "../autonomi", version = "0.3.4", features = ["fs"]}
autonomi = { path = "../autonomi", version = "0.3.5", features = ["fs"]}
criterion = "0.5.1"
eyre = "0.6.8"
rand = { version = "~0.8.5", features = ["small_rng"] }
Expand Down
2 changes: 1 addition & 1 deletion ant-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ xor_name = "5.0.0"
ant-protocol = { path = "../ant-protocol", version = "0.3.3", features = ["rpc"] }
assert_fs = "1.0.0"
evmlib = { path = "../evmlib", version = "0.1.8" }
autonomi = { path = "../autonomi", version = "0.3.4", features = ["registers"] }
autonomi = { path = "../autonomi", version = "0.3.5", features = ["registers"] }
reqwest = { version = "0.12.2", default-features = false, features = [
"rustls-tls-manual-roots",
] }
Expand Down
2 changes: 1 addition & 1 deletion autonomi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers <[email protected]>"]
description = "Autonomi client API"
name = "autonomi"
license = "GPL-3.0"
version = "0.3.4"
version = "0.3.5"
edition = "2021"
homepage = "https://maidsafe.net"
readme = "README.md"
Expand Down
6 changes: 4 additions & 2 deletions autonomi/src/client/data/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ use crate::{self_encryption::encrypt, Client};
use ant_evm::{Amount, AttoTokens};
use ant_networking::{GetRecordCfg, NetworkError};
use ant_protocol::{
storage::{try_deserialize_record, Chunk, ChunkAddress, RecordHeader, RecordKind},
storage::{
try_deserialize_record, Chunk, ChunkAddress, RecordHeader, RecordKind, RetryStrategy,
},
NetworkAddress,
};

Expand Down Expand Up @@ -116,7 +118,7 @@ impl Client {
debug!("Fetching chunk from network at: {key:?}");
let get_cfg = GetRecordCfg {
get_quorum: Quorum::One,
retry_strategy: None,
retry_strategy: Some(RetryStrategy::Balanced),
target_record: None,
expected_holders: HashSet::new(),
is_register: false,
Expand Down
2 changes: 1 addition & 1 deletion release-cycle-info
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
release-year: 2024
release-month: 12
release-cycle: 1
release-cycle-counter: 10
release-cycle-counter: 11

0 comments on commit 490eea2

Please sign in to comment.