Skip to content

Commit

Permalink
docs: fix typos and grammar
Browse files Browse the repository at this point in the history
Co-authored-by: Joseph Livesey <[email protected]>
  • Loading branch information
gusinacio and suchapalaver committed Feb 6, 2025
1 parent 336598b commit 035bd41
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions crates/tap-agent/src/adaptative_concurrency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
// SPDX-License-Identifier: Apache-2.0

//! # Adaptative concurrency
//! This module provide [AdaptiveLimiter] as a tool to allow concurrency.
//! It's implemented with a Additive increase, Multiplicative decrease
//! This module provides [AdaptiveLimiter] as a tool to allow concurrency.
//! It's implemented with an Additive increase, Multiplicative decrease
//! ([AIMD](https://en.wikipedia.org/wiki/Additive_increase/multiplicative_decrease))
//! strategy.
//!
//!
//!
//! This allows us to have a big number of rav requests running
//! concurrently, but in case of any of them fails, we limit
//! concurrently, but if any of them fails we limit
//! the following requests until the aggregator recovers.
//!
//! ## Behaviour
//! On every request, the caller acquires a slot by calling [AdaptiveLimiter::acquire()],
//! this will increment the number of in_flight connections.
//! On every request, the caller acquires a slot by calling [AdaptiveLimiter::acquire()].
//! This will increment the number of in_flight connections.
//!
//! If we receive a successful response, we increment our limit to be able to process
//! one more request concurrently.
//!
//! If we receive a failed response, we decrement our limit by half so quickly
//! If we receive a failed response, we decrement our limit by half to quickly
//! relieve the pressure in the system.
use std::ops::Range;
Expand Down
2 changes: 1 addition & 1 deletion crates/tap-agent/src/backoff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl BackoffInfo {
self.failed_count += 1;
}

/// Returns if is in backoff
/// Returns if backoff is in process
pub fn in_backoff(&self) -> bool {
let now = Instant::now();
now < self.failed_backoff_time
Expand Down
3 changes: 2 additions & 1 deletion crates/tap-agent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
#![warn(missing_docs)] // Warns if any public item lacks documentation

//! # Tap-Agent
//!
//! This software is used to monitor receipts inserted in the database
//! and to keep track of all the values across different allocations.
//!
//! It's main goal is that the value never goes below the balance available
//! Its main goal is that the value never goes below the balance available
//! in the escrow account for a given sender.
use indexer_config::Config;
Expand Down
2 changes: 1 addition & 1 deletion crates/tap-agent/src/tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ pub trait AllocationStats<U> {
///
/// Pending fees are usually fees that not eligible to trigger a RAV,
/// for example, you don't want to trigger a Rav Request if your only allocation is currently
/// requesting, so this should return a value that don't contains that allocation
/// requesting, so this should return a value that doesn't contain that allocation
fn get_valid_fee(&mut self) -> u128;
}
4 changes: 2 additions & 2 deletions crates/tap-agent/src/tracker/sender_fee_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pub struct SenderFeeStats {
pub(super) total_fee: u128,
/// counter of receipts
pub(super) count: u64,
/// there are some allocations that we don't want it to be
/// heaviest allocation, because they are already marked for finalization,
/// there are some allocations that we don't want to be the
/// heaviest allocation. This is because they are already marked for finalization,
/// and thus requesting RAVs on their own in their `post_stop` routine.
pub(super) blocked: bool,
/// amount of fees that are currently being requested
Expand Down

0 comments on commit 035bd41

Please sign in to comment.