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

[v24.1.x] Always use the latest configuration for followers metadata #20148

Commits on Jul 17, 2024

  1. r/consensus: removed obsolete comment

    Removed comment mentioning that we should add applying snapshot to stm
    as this is already being done
    
    Signed-off-by: Michał Maślanka <[email protected]>
    (cherry picked from commit 2f287e2)
    mmaslankaprv committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    9dc9ad9 View commit details
    Browse the repository at this point in the history
  2. r/consensus: always use the latest configuration for followers metadata

    When install snapshot request in processed by the follower it may not
    always replace the follower log content. If the snapshot last included
    offset is smaller than the follower dirty offset the follower should
    prefix truncate all the data up to the snapshot last included offset but
    keep all the entries which offset is greater than snapshot last included
    offset.
    
    Fixed the update of follower metadata state as it was always using the
    snapshot configuration instead the latest from the configuration
    manager.
    
    Fixes: #core-internal/issues/1310
    
    Signed-off-by: Michał Maślanka <[email protected]>
    (cherry picked from commit c69709f)
    mmaslankaprv committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    580cdeb View commit details
    Browse the repository at this point in the history
  3. r/consensus: always step down when install snapshot request is received

    When install snapshot request is received by the current leader it must
    unconditionally step down. This is the same behavior as in the case of
    receiving an append entries request.
    
    Signed-off-by: Michał Maślanka <[email protected]>
    (cherry picked from commit 571aa19)
    mmaslankaprv committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    28a1490 View commit details
    Browse the repository at this point in the history
  4. r/tests: added test validating delayed install snapshot request delivery

    When install snapshot request is delayed and deliver to the node after
    it already made progress it can not lead to state inconsistencies. Added
    test validating handing of delayed `install_snapshot` requests. The test
    is validating behavior of both follower and the leader.
    
    Signed-off-by: Michał Maślanka <[email protected]>
    (cherry picked from commit e73aa28)
    mmaslankaprv committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    7ac9f96 View commit details
    Browse the repository at this point in the history
  5. tests: infrastructure improvements

    (cherry picked from commit b52b4c3)
    bashtanov authored and mmaslankaprv committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    61b5ed7 View commit details
    Browse the repository at this point in the history
  6. tests: improve raft_fixture::retry_with_leader error processing

    Support std::error_code, raft::errc, cluster::errc and bool,
    both individually and as part of a result<..., ...>
    
    (cherry picked from commit 94e99f0)
    bashtanov authored and mmaslankaprv committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    84475c6 View commit details
    Browse the repository at this point in the history
  7. id_allocator: make it return a result<...> instead of a homemade type

    That's mostly for later use in raft_fixture::retry_with_leader
    
    (cherry picked from commit 07e714f)
    bashtanov authored and mmaslankaprv committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    9120877 View commit details
    Browse the repository at this point in the history
  8. tests: base id_allocator_stm_test on raft_fixture

    As part of deprecating simple_raft_fixture in favour of raft_fixture,
    making id_allocator_stm_test to use the latter.
    
    (cherry picked from commit 3821433)
    bashtanov authored and mmaslankaprv committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    cd9d637 View commit details
    Browse the repository at this point in the history