tikv / tikv/client-go

Empty value is not supported

Open
#87 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
362
Forks
274
Avg merge
4d 19m
Merged PRs (30d)
12

Description

It is a historical problem. This client is extracted from TiDB. In TiDB, every key has a non-empty value. In the implementation, the client treats an empty value as the key does not exist, and it also rejects putting a pair with empty value.

But TiKV actually supports a key with zero-length value. The user can put a key with an empty value with another client (e.g. client-rust). Then, they will find the key does not exist when reading with this client.

cc @andylokandy @disksing

Contributor guide

Open the contributing guide

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 Go client's put and read paths described in the issue, focusing on how zero-length values are validated and interpreted. Compare the behavior with TiKV and client-rust, then add or update coverage for putting and reading a key with an empty value. Done means an empty value is accepted and the key is still reported as existing.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.