Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retry mechanism #66

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Add retry mechanism #66

merged 2 commits into from
Jun 20, 2024

Commits on Mar 5, 2024

  1. Simplify usage of latte's 'connect' function from the 'context' module

    Before there were 2 separate fn calls in the 'src/main.rs' module:
    
        let session = context::connect(conf).await?;
        let session = Context::new(session);
    
    With this change we simplify it the way that we will do only one call:
    
        let session = context::connect(conf).await?;
    vponomaryov committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    0305d03 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2024

  1. Add retry mechanism

    With this change it is now possible to configure retry approach for queries.
    Following new options are available:
    
      --retry-number=10
      --retry-interval=200ms | --retry-interval=100ms,3s
      --request-timeout=5
    
    The '--retry-number' option allows to configure number of retries to be applied
    in case of query failures. Default is '10'.
    
    The '--retry-interval' option may store one or two time values separated
    with comma.
    Values may have 'ms' (milliseconds), 's' (seconds) units.
    If 2 are specified then it will be 'minimum' and 'maximum' waiting interval
    with exponential growth based on the made attempts. Default is '100ms,5s'.
    
    The '--request-timeout' allows to configure the time for a query after which
    it is considered as 'failed'. Measured in seconds. Default is '5'.
    
    Print only 5 retry error messages per sample interval.
    Also, hide long 'string' and 'blob' values from the retry error messages.
    vponomaryov committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    6cb6722 View commit details
    Browse the repository at this point in the history