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

Feature: Retrieve Key Log IDs via RaftLogReader::get_key_log_ids() #1264

Merged
merged 1 commit into from
Nov 8, 2024

Commits on Nov 8, 2024

  1. Feature: Retrieve Key Log IDs via RaftLogReader::get_key_log_ids()

    Key log IDs represent the first log IDs proposed by each Leader. These
    IDs enable Openraft to efficiently access log IDs at each index with
    a succinct storage.
    
    Previously, key log IDs were obtained using a binary-search-like
    algorithm through `RaftLogReader`. This commit introduces the
    `RaftLogReader::get_key_log_ids()` method, allowing implementations to
    directly return a list of key log IDs if the `RaftLogStorage` can
    provide them.
    
    For backward compatibility, a default implementation using the original
    binary-search method is provided. No application changes are required
    when upgrading to this version.
    
    Tests verifying the implementation are included in
    `openraft::testing::log::suite::Suite`.
    
    - Fixes: databendlabs#1261
    drmingdrmer committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    9178ef8 View commit details
    Browse the repository at this point in the history