tikv / tikv/client-rust

`pessimistic_lock` can be cached

Open
#308 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Rust
Stars
425
Forks
163
Avg merge
10h 51m
Merged PRs (30d)
3

Description

Currently pessimistic_lock will always issue a request.
If heartbeat is enabled, we don't have to lock the same key for multiple times.
For get_for_update-like operations, we can have a separate cache to cache its value.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the pessimistic_lock implementation and the heartbeat handling it uses. Compare that path with get_for_update-like operations, then define the cache behavior and verify that repeated locks for the same key avoid requests while heartbeat is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.