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

multi: ensure link is always torn down due to db failures, add exponential back off for sql-kvdb failures #7927

Merged
merged 7 commits into from
Aug 30, 2023

Commits on Aug 30, 2023

  1. lnwallet: fix log output msg

    The log message is off by one.
    ziggie1984 authored and Roasbeef committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    78aa555 View commit details
    Browse the repository at this point in the history
  2. htlcswitch: fail channel when revoking it fails.

    When the revocation of a channel state fails after receiving a new
    CommitmentSigned msg we have to fail the channel otherwise we
    continue with an unclean state.
    ziggie1984 authored and Roasbeef committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    f08fa0e View commit details
    Browse the repository at this point in the history
  3. docs: update release-docs

    ziggie1984 authored and Roasbeef committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    d07f4c0 View commit details
    Browse the repository at this point in the history
  4. htlcswitch: tear down connection if revocation processing fails

    If we couldn't revoke due to a DB error, then we want to also tear down
    the connection, as we don't want the other party to continue to send
    updates. That may lead to de-sync'd state an eventual force close.
    Otherwise, the database might be able to recover come the next
    reconnection attempt.
    Roasbeef committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    f38c19c View commit details
    Browse the repository at this point in the history
  5. kvdb: use sql.LevelSerializable for all backends

    In this commit, we modify the default isolation level to be
    `sql.LevelSerializable. This is the strictness isolation type for
    postgres. For sqlite, there's only ever a single writer, so this doesn't
    apply directly.
    Roasbeef committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    ab01331 View commit details
    Browse the repository at this point in the history
  6. kvdb/sqlbase: add randomized exponential backoff for serialization fa…

    …ilures
    
    In this commit, we add randomized exponential backoff for serialization
    failures. For postgres, we''ll his this any time a transaction set fails
    to be linearized. For sqlite, we'll his this if we have many writers
    trying to grab the write lock at time same time, manifesting as a
    `SQLITE_BUSY` error code.
    
    As is, we'll retry up to 10 times, waiting a minimum of 50 miliseconds
    between each attempt, up to 5 seconds without any delay at all. For
    sqlite, this is also bounded by the busy timeout set, which applies on
    top of this retry logic (block for busy timeout seconds, then apply this
    back off logic).
    Roasbeef committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    a2076a8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9e25f9f View commit details
    Browse the repository at this point in the history