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

Update proxy to near TiKV 0b97a39d520afcd82a02d0f5c0966d6ccab2cd74 #377

Merged
merged 50 commits into from
Jul 16, 2024

Commits on Jun 14, 2024

  1. In-memory engine: set boundries when gc (tikv#17145)

    ref tikv#16141, close tikv#17143
    
    set boundries when gc
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    SpadeA-Tang and ti-chi-bot[bot] authored Jun 14, 2024
    Configuration menu
    Copy the full SHA
    1dea3d2 View commit details
    Browse the repository at this point in the history
  2. In-memory engine: encode key for lock cf without mvcc version in dele…

    …te range (tikv#17142)
    
    ref tikv#16141, close tikv#17140
    
    encode key for lock cf without mvcc version in delete range
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    SpadeA-Tang and ti-chi-bot[bot] authored Jun 14, 2024
    Configuration menu
    Copy the full SHA
    bb38d10 View commit details
    Browse the repository at this point in the history
  3. In-memory Engine: get GC safe_point from PD (tikv#17144)

    close tikv#17123
    
    The `safe_point` is used to check if a cache is eligible to serve a read request.
    If the `safe_point` drifts into the future, for example by 10 minutes, the cache
    will not be able to serve any requests for those 10 minutes.
    
    This commit fixes such issue by getting the `safe_point` from PD.
    
    Signed-off-by: Neil Shen <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    overvenus and ti-chi-bot[bot] authored Jun 14, 2024
    Configuration menu
    Copy the full SHA
    b624462 View commit details
    Browse the repository at this point in the history
  4. In-Memory Engine: Eviction, Algorithmic loading (tikv#17023)

    ref tikv#16141, ref tikv#16764
    
    In-Memory Engine: Algorithmic Load and Eviction
    
    Signed-off-by: Alex Feinberg <[email protected]>
    afeinberg authored Jun 14, 2024
    Configuration menu
    Copy the full SHA
    7bf8ca3 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. cdc: re-design delegate and downstream to support partial region subs…

    …cription better (tikv#16645)
    
    close tikv#16526
    
    Signed-off-by: qupeng <[email protected]>
    hicqu authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    75bd5af View commit details
    Browse the repository at this point in the history
  2. In-memory engine: consider range overlaps when eviction (tikv#17137)

    ref tikv#16141, close tikv#17131
    
    consider range overlaps when eviction
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    8a10909 View commit details
    Browse the repository at this point in the history
  3. In-memory engine: support delete range (tikv#17151)

    ref tikv#16141
    
    support delete range
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    8903f2a View commit details
    Browse the repository at this point in the history
  4. copr: let ExtraPhysTblIDCol column return partition id when it's a …

    …global indexScan (tikv#17141)
    
    close tikv#17138
    
    let `ExtraPhysTblIDCol` column return partition id when it's a global indexScan
    
    Signed-off-by: Jason Mo <[email protected]>
    Signed-off-by: Hangjie Mo <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    Defined2014 and ti-chi-bot[bot] authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    3714780 View commit details
    Browse the repository at this point in the history
  5. raftstore: handle region destroy in a separate thread pool (tikv#17121)

    close tikv#16001
    
    The dispatch of snapshot generation tasks and region destruction are handled 
    by the same thread. It was observed in tikv#12587 that region destruction can take 
    a long time and block snapshot generation. This commit addresses the problem by
    handling the region destruction in a separate thread pool. To support running 
    the logic in a separate pool, methods related to region destruction (e.g. 
    clean_stale_ranges, clean_overlap_ranges_roughly, clean_overlap_ranges) are 
    moved under a new struct called `RegionCleaner`. Note that there is no 
    functional change to those methods at all. The new struct is wrapped inside a 
    mutex for thread safety because the original thread also needs to call 
    `clean_overlap_ranges` when applying a snapshot.
    
    After the change, region destruction will no longer block snapshot generation, 
    but it can still block snapshot apply because an apply task also needs to 
    detroy regions.
    
    Signed-off-by: Bisheng Huang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    hbisheng and ti-chi-bot[bot] authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    273ec86 View commit details
    Browse the repository at this point in the history
  6. In-memory engine: evict range should consider loading range (tikv#17154)

    close tikv#17153
    
    evict range should consider loading range
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    SpadeA-Tang and ti-chi-bot[bot] authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    fe3ef87 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. In-memory engine: clear write batch when range load failed (tikv#17156)

    ref tikv#16141, close tikv#17103
    
    clear write batch when range load failed
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    9632aa7 View commit details
    Browse the repository at this point in the history
  2. *: replace case_macros with heck (tikv#17157)

    ref tikv#11189
    
    As suggested in tikv#11189, using a dedicated procedural macro for simple
    literal case conversion is overkill. This commit replace `case_macros`
    (a procedural macro crate) with `heck`. It not only simplifies the code,
    but also slightly reduces the TiKV binary size, as `heck` is already
    in the dependency tree.
    
    Signed-off-by: Neil Shen <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    overvenus and ti-chi-bot[bot] authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    b4bfab8 View commit details
    Browse the repository at this point in the history
  3. raftstore: add metrics to track pending snapshot applies (tikv#17097)

    ref tikv#17078
    
    In a recent issue, it took a long time for snapshots to be applied likely due
    to a high number of L0 files, but it wasn't easy to troubleshoot the problem.
    This commit introduces metrics to track the number of pending snapshot applies
    and the occurrences of snapshot ingest delays to help diagnose similar 
    problems.
    
    Signed-off-by: Bisheng Huang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    Co-authored-by: lucasliang <[email protected]>
    3 people authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    1b51679 View commit details
    Browse the repository at this point in the history
  4. In-memory engine: fix concurrency issue between delete range and writ…

    …e to memory (tikv#17149)
    
    close tikv#17104
    
    fix concurrency issue between delete range and write to memory
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    SpadeA-Tang and ti-chi-bot[bot] authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    e3b8e84 View commit details
    Browse the repository at this point in the history
  5. In-memory engine: add seek duration metrics (tikv#17160)

    ref tikv#16141
    
    add seek duration metrics
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    9d302ea View commit details
    Browse the repository at this point in the history
  6. config: deprecated rocksdb log configs (tikv#17009)

    ref tikv#15990
    
    The rocksdb log is replace by tikv log in tikv#7358 about 4 years ago. After this PR, rocksdb configs `info_log_max_size`, `info_log_roll_time`, `info_log_keep_log_file_num` and `info_log_level` are no long taken effect. This PR marks these configs as deprecated and clean up related code.
    
    Signed-off-by: glorv <[email protected]>
    glorv authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    b34b5a6 View commit details
    Browse the repository at this point in the history
  7. In-memory engine: add metrics for prepare for write duration (tikv#17161

    )
    
    ref tikv#16141
    
    add metrics for prepare for write duration
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    e0659a3 View commit details
    Browse the repository at this point in the history
  8. In-memory engine: set disk engine when start (tikv#17165)

    ref tikv#16141
    
    set disk engine when start
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    SpadeA-Tang and ti-chi-bot[bot] authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    79848ea View commit details
    Browse the repository at this point in the history
  9. Fix gRPC request source duration inaccurate issue (tikv#17132)

    close tikv#17133
    
    Signed-off-by: Jinlong Liu <[email protected]>
    Signed-off-by: King-Dylan <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    King-Dylan and ti-chi-bot[bot] authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    fc3dc83 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. raftstore: avoid deleting snap files in raftstore thread (tikv#17155)

    close tikv#8160
    
    This commit offloads one case of snapshot deletion from the raftstore 
    thread to the background cleanup thread introduced in tikv#12415. This 
    aligns with the principle of performing only performance-critical work 
    in the raftstore thread.
    
    Signed-off-by: Bisheng Huang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    hbisheng and ti-chi-bot[bot] authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    8e1f26b View commit details
    Browse the repository at this point in the history
  2. In-memory engine: avoid using snapshot cache (tikv#16863)

    ref tikv#16141
    
    avoid using snapshot cache
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    7c263c5 View commit details
    Browse the repository at this point in the history
  3. In-memory engine: evict range after some raft commands (tikv#17159)

    ref tikv#16141
    
    evict range when becomeing follower, merge, and deleting data ranges.
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    3a652aa View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. In-memory engine: filter plus one when any key is removed during GC (

    …tikv#17171)
    
    ref tikv#16141
    
    filter plus one when any key is removed during GC
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    Signed-off-by: Spade  A <[email protected]>
    SpadeA-Tang authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    ca7f0d5 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2024

  1. *: add crossbeam-skiplist into components (tikv#17167)

    ref tikv#17166
    
    Currently, the In-memory Engine heavily uses tikv/skiplist-rs, which is
    a fork of crossbeam-skiplist. This fork was created to include a patch
    crossbeam-skiplist#1091 that has not yet been merged.
    
    Maintaining this fork in a separate repository has proven to be
    impractical for several reasons:
    
    * It contains only one TiKV-specific change.
    * It will not be released to crates.io.
    * PRs in this repository rarely receive code reviews.
    
    After discussing offline, we have decided to move this fork into the TiKV
    components repository. We hope this change will:
    
    * Streamline maintenance.
    * Increase visibility and code review participation.
    
    Signed-off-by: Neil Shen <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    overvenus and ti-chi-bot[bot] authored Jun 22, 2024
    Configuration menu
    Copy the full SHA
    d923e3c View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. log_backup: Adapt for log backup encrypting (tikv#16993)

    close tikv#15083
    
    Allows log backup to read the encryption config and use it to encrypt the local files.
    
    Signed-off-by: hillium <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    YuJuncen and ti-chi-bot[bot] authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    87f6643 View commit details
    Browse the repository at this point in the history
  2. *: upgrade crossbeam-channel (tikv#17179)

    ref tikv#17178
    
    Fix memory leak in crossbeam-channel's unbounded channel.
    
    Signed-off-by: Neil Shen <[email protected]>
    overvenus authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    da81e6e View commit details
    Browse the repository at this point in the history
  3. cdc: fix panic on finish prepare locks (tikv#17174)

    close tikv#17172
    
    allow pop untracked lock to prevent cdc component panic
    
    Signed-off-by: 3AceShowHand <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    3AceShowHand and ti-chi-bot[bot] authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    6324668 View commit details
    Browse the repository at this point in the history
  4. grpc: set compression args for TiKV service (tikv#17180)

    close tikv#17176
    
    Set compression arguments for TiKV service. The compression arguments are loaded from TiKV config.
    It will affect TiKV's response to TiDB.
    
    Signed-off-by: ekexium <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    ekexium and ti-chi-bot[bot] authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    a1f05d6 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. backup: continue to seek regions if one range has no located leader r…

    …egion (tikv#17169)
    
    close tikv#17168
    
    backup: continue to seek regions if one range has no located leader region
    
    Signed-off-by: Jianjun Liao <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    Leavrth and ti-chi-bot[bot] authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    99ecb83 View commit details
    Browse the repository at this point in the history
  2. In-memory engine: correct under-estimate memory size usage of delete …

    …entries. (tikv#17183)
    
    close tikv#17106
    
    fix under-estimate memory size usage of delete entry
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    d6f29bf View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. In-memory engine: fix name inconsistency (tikv#17184)

    ref tikv#16141
    
    fix name inconsistency
    
    Signed-off-by: SpadeA-Tang <[email protected]>
    SpadeA-Tang authored Jun 26, 2024
    Configuration menu
    Copy the full SHA
    52b613a View commit details
    Browse the repository at this point in the history
  2. Update OWNERS_ALIASES (tikv#17193)

    ref tikv#17004
    
    add `zhangjinpeng87` into alias: `sig-critical-approvers-config-src` to approval tikv storage parts.
    
    Signed-off-by: wuhuizuo <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    wuhuizuo and ti-chi-bot[bot] authored Jun 26, 2024
    Configuration menu
    Copy the full SHA
    c9d4079 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. cdc: remove redundant conn id from the handle register task (tikv#17177)

    close tikv#17194
    
    remove `conn_id` field from the `Task::Register`
    
    Signed-off-by: 3AceShowHand <[email protected]>
    3AceShowHand authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    5229f83 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2024

  1. cdc: introduce RequesetId type to make the code more clear (tikv#17209

    )
    
    close tikv#17214
    
    cdc introduce a new type named `RequesetId` to specify each request id.
    
    Signed-off-by: 3AceShowHand <[email protected]>
    3AceShowHand authored Jun 28, 2024
    Configuration menu
    Copy the full SHA
    ec2916e View commit details
    Browse the repository at this point in the history
  2. raftstore: Enhance slow log for peer/store messages with detailed info (

    tikv#17164)
    
    ref tikv#15990
    
    Enhance slow log for peer/store messages with detailed info
    
    Signed-off-by: Connor1996 <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    Connor1996 and ti-chi-bot[bot] authored Jun 28, 2024
    Configuration menu
    Copy the full SHA
    b7db65c View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2024

  1. cdc: rollback txn-source attached transactions correctly (tikv#17210)

    close tikv#17211
    
    cdc: rollback txn-source attached transactions correctly
    
    Signed-off-by: qupeng <[email protected]>
    Signed-off-by: qupeng <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    Co-authored-by: Neil Shen <[email protected]>
    3 people authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    9fc8713 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. raftstore: cancel gen snap task if a peer becomes unreachable (tikv#1…

    …7215)
    
    close tikv#17191, close tikv#17213
    
    After tikv#17019, raft snapshots get blocked when a peer is removed
    immediately after requesting a snapshot. This occurs because the leader
    must wait for `MsgSnapGenPrecheckResponse` before generating snapshots.
    As a result, not only is the snapshot blocked, but subsequent conf
    changes (such as adding a node) are also blocked.
    
    To resolve this issue, TiKV needs to cancel the snapshot generation
    task if a peer becomes unreachable.
    
    Signed-off-by: Neil Shen <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    overvenus and ti-chi-bot[bot] authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    d7a33dd View commit details
    Browse the repository at this point in the history
  2. grafana: Fix display of ingest SST and compaction size (tikv#17219)

    ref tikv#15990
    
    Fix display of ingest SST and compaction size
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    Connor1996 and ti-chi-bot[bot] authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    e278928 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. security: refactor to support new mode marker. (tikv#17212)

    ref tikv#17206
    
    Introduce a new security mode `marker` for log desensitization.
    
    Signed-off-by: lucasliang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    LykxSassinator and ti-chi-bot[bot] authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    f1ca8b3 View commit details
    Browse the repository at this point in the history
  2. In-memory Engine: evict range on ingest sst (tikv#17217)

    close tikv#17182
    
    Both Lightning import and BR restore will read ingest data for checksum
    verification. However, TiKV currently does not load SST files immediately
    after ingestion. This delay causes checksum mismatches, leading to
    failures in Lightning and BR.
    
    This commit workaround such issue by evict ranges that are ingested sst.
    
    Signed-off-by: Neil Shen <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    overvenus and ti-chi-bot[bot] authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    2fcc5ab View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. profiling: Fix cpu profiling flag may not reset when meeting errors (t…

    …ikv#17235)
    
    close tikv#17234
    
    Fix cpu profiling flag may not reset when meeting errors
    
    Signed-off-by: Connor1996 <[email protected]>
    Connor1996 authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    2a05e51 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. In-memory Engine: add prop test for skiplist (tikv#17236)

    ref tikv#16141
    
    Add property test for skiplist map vs. RocksDB. This test validates
    basic key-value operations including put, get, delete, scan, and
    delete_range.
    
    Signed-off-by: Neil Shen <[email protected]>
    overvenus authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    365e573 View commit details
    Browse the repository at this point in the history
  2. metrics: fix incorrect statistics in Ingest SST duration seconds. (t…

    …ikv#17240)
    
    ref tikv#17239
    
    This pr is used to fix the incorrect metrics on `Ingest SST duration seconds`, introduced in tikv#17070
    
    Signed-off-by: lucasliang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    LykxSassinator and ti-chi-bot[bot] authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    edfd1b9 View commit details
    Browse the repository at this point in the history
  3. raftstore: fix snap gen cancellation (tikv#17231)

    close tikv#17226
    
    As a follow-up of tikv#17215, this commit fixes an issue with the
    `cancel_generating_snap` function to ensure that `snap_tried_cnt`
    within PeerStorage is not unexpectedly incremented.
    
    Background:
    In PeerStorage, `snap_tried_cnt` is used to track the number of
    snapshot generation attempts. As with what happened in tikv#17226, TiKV
    would panic if `snap_tried_cnt` exceeds the limit (currently hardcoded
    to 5). By design, `snap_tried_cnt` should only be incremented when an
    actual failure happens during the snapshot generation process. It
    should not be incremented if the snapshot generation is intentionally
    canceled.
    
    Although its name suggests so, the `cancel_generating_snap` function
    doesn't always cancel the snapshot generation. If the inputting
    `compact_to` is so small that it doesn't make the snapshot stale,
    `cancel_generating_snap` will return early and won't set `cancel` to
    true. In the fix, we ensure that we only cancel the precheck when
    `cancel` is set to true. Without it, `snapshot()` will see a 
    `TryRecvError::Disconnected` error while `last_canceled` is false and 
    increment `tried_cnt`.
    
    Note that `cancel_generating_snap` is only called with a `compact_to`
    value in `on_compact_raftlog`, which I believe to be the trigger of
    issue tikv#17226.
    
    Also, this commit fixes a similar problem to ensure that `tried_cnt` is
    not incremented in another potential scenario—when the peer requesting
    snapshot is unknown.
    
    Signed-off-by: Bisheng Huang <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    hbisheng and ti-chi-bot[bot] authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    99485de View commit details
    Browse the repository at this point in the history
  4. cdc: revert the enhancemant about region partial subscription (tikv#1…

    …7228)
    
    close tikv#17229
    
    cdc: revert the enhancemant about region partial subscription
    
    Signed-off-by: qupeng <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    hicqu and ti-chi-bot[bot] authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    212d2d5 View commit details
    Browse the repository at this point in the history
  5. In-memory Engine: do not evict range on applying snapshot (tikv#17237)

    ref tikv#16141
    
    Do not evict the cache when applying a snapshot because the peer
    must be in the follower role during this process. The cache is
    already evicted when the leader steps down.
    
    Signed-off-by: Neil Shen <[email protected]>
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    overvenus and ti-chi-bot[bot] authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    fe7d523 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. br: pre-check TiKV disk space before download (tikv#17238)

    close tikv#17224
    
    Add a disk usage check when execute `download` and `apply` RPC from br.
    When the disk is not `Normal`, the request would be rejected.
    
    Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
    RidRisR and ti-chi-bot[bot] authored Jul 8, 2024
    Configuration menu
    Copy the full SHA
    485c434 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. cdc: skip incremental scaned events after region fails (tikv#17248)

    close tikv#17233
    
    cdc: skip incremental scaned events after region fails
    
    Signed-off-by: qupeng <[email protected]>
    hicqu authored Jul 9, 2024
    Configuration menu
    Copy the full SHA
    4013c09 View commit details
    Browse the repository at this point in the history
  2. In-memory Engine: Replace skiplist-rs with crossbeam-skiplist (tikv#1…

    …7257)
    
    close tikv#17166
    
    Following up on tikv#17167, this commit cherry-picks the remaining
    `OwnedIter` changes from the tikv/skiplist-rs repository. It also
    replaces skiplist-rs with crossbeam-skiplist in the TiKV codebase.
    
    Signed-off-by: Neil Shen <[email protected]>
    
    Co-authored-by: SpadeA-Tang <[email protected]>
    overvenus and SpadeA-Tang authored Jul 9, 2024
    Configuration menu
    Copy the full SHA
    0b97a39 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. Configuration menu
    Copy the full SHA
    945d16c View commit details
    Browse the repository at this point in the history