cockroachdb / cockroachdb/cockroach

kv: log rangelog events as structured events

Open
#104,075 0 comments 0 reactions 0 assignees View on GitHub
A-kv C-enhancement T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Logging to `system.rangelog` is async by default (after #102813 is merged), which means a range change might succeed but the logging might fail. We should log a _structured_ event to `KV_DISTRIBUTION` as an auxiliary logging mechanism.

Currently, we can't use `kvserver.RangeLogEvent` directly as a structured event because that will introduce an unnecessary dependency from `eventpb` to `kvserver` and `roachpb`. We should either refactor the `RangeLogEvent` struct, or create a new struct for structured logging.

The alternative to write an _unstructured_ event to `KV_DISTRIBUTION` was dismissed because we don't have a good way to process unstructured events.

Epic: CRDB-28526

Jira issue: CRDB-28344

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.