cockroachdb / cockroachdb/cockroach

kv: lhs range with 0 bytes will never be merged

Open
#100,443 20 comments 0 reactions 0 assignees View on GitHub
C-bug O-community T-kv X-blathers-triaged
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

There are a lot of 0-byte ranges in the cluster but not serial. For example,

R1: 0 bytes
R2: 10 bytes
R3: 0 bytes
R4: 10 bytes
....

If the merge-threshold is 5 bytes, then in the merge queue( pkg/kv/kvserver/merge_queue.go)

R1 will never be merged, since R2 is bigger than the threshold.

What should we deal with such case?

**To Reproduce**

What did you do? Describe in your own words.

If possible, provide steps to reproduce the behavior:

1. Set up CockroachDB cluster ...
2. Send SQL ... / CLI command ...
3. Look at UI / log file / client app ...
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional data / screenshots**
If the problem is SQL-related, include a copy of the SQL query and the schema
of the supporting tables.

If a node in your cluster encountered a fatal error, supply the contents of the
log directories (at minimum of the affected node(s), but preferably all nodes).

Note that log files can contain confidential information. Please continue
creating this issue, but contact support@cockroachlabs.com to submit the log
files in private.

If applicable, add screenshots to help explain your problem.

**Environment:**
- CockroachDB version [e.g. 2.0.x]
- Server OS: [e.g. Linux/Distrib]
- Client app [e.g. `cockroach sql`, JDBC, ...]

**Additional context**
What was the impact?

Add any other context about the problem here.

Jira issue: CRDB-26438

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.