Skip to content

kvcoord,kvserver: add a few more trace lines#150402

Open
stevendanna wants to merge 1 commit intocockroachdb:masterfrom
stevendanna:ssd/more-tracing-info
Open

kvcoord,kvserver: add a few more trace lines#150402
stevendanna wants to merge 1 commit intocockroachdb:masterfrom
stevendanna:ssd/more-tracing-info

Conversation

@stevendanna
Copy link
Copy Markdown
Collaborator

@stevendanna stevendanna commented Jul 17, 2025

This adds a few new trace events:

  • Make it clear whether a batch used async consensus or not. Currently, when reading a trace you have to just sort of know which log entries are missing when async consensus is used.

  • Log the batch that the kv client handed to the coord sender. This log line may be a bit redundant for SQL-initiated transactions, but it seems like it would be helpful when debugging KVNemesis.

  • Log the batch that the coord sender is handing to distsender. This batch may be substantively different than the original batch that was handed to the coord sender.

Informs #150304

Release note: None

@blathers-crl
Copy link
Copy Markdown

blathers-crl Bot commented Jul 17, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@stevendanna stevendanna force-pushed the ssd/more-tracing-info branch 2 times, most recently from 83b51d2 to 69af6b5 Compare July 17, 2025 19:28
@stevendanna stevendanna marked this pull request as ready for review July 17, 2025 19:28
@stevendanna stevendanna requested a review from a team as a code owner July 17, 2025 19:28
@stevendanna stevendanna requested a review from arulajmani July 17, 2025 19:28
This adds a few new trace events:

- Make it clear whether a batch used async consensus or not. Currently,
  when reading a trace you have to just sort of know which log entries
  are missing when async consensus is used.

- Log the batch that the kv client handed to the coord sender. This log
  line may be a bit redundant for SQL-initiated transactions, but it
  seems like it would be helpful when debugging KVNemesis.

- Log the batch that DistSender is given. Often this can be
  substantively different than the user-provided batch since the
  transaction coordinator's interceptors can add, remove, or mutate
  requests.

- Log sub-batches produced by ba.Split. I often forget this level of
  splitting even exists.

Informs cockroachdb#150304

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants