Skip to content

Conversation

@gilbi123
Copy link

This PR improves the error logging when the "failed to decode region range key" error occurs.
Previously, the error message lacked details about the region ranges involved, which made debugging difficult.

Now, when the decoding error happens, the relevant region key ranges (startKey and endKey) are logged in the error message, providing better context to understand and diagnose the issue.

Changes:

Enhanced error messages in region cache functions to include region key ranges.

Added detailed logging of region start and end keys when decode errors happen.

This addresses issue #1678.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 27, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign andylokandy for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 27, 2025

Welcome @gilbi123!

It looks like this is your first PR to tikv/client-go 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to tikv/client-go. 😃

@ti-chi-bot ti-chi-bot bot added the dco-signoff: no Indicates the PR's author has not signed dco. label Jun 27, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 27, 2025

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

  • 9a91776 log region ranges when 'failed to decode region range key' error occurs

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 27, 2025
@ekexium
Copy link
Contributor

ekexium commented Jun 29, 2025

Hi, remember to sign off your all commits, and remove unrelated files please.

@ekexium
Copy link
Contributor

ekexium commented Jun 29, 2025

How about adding key details in errors returned from decodeBytes so that callers don't have to worry much about logging?

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

Labels

dco-signoff: no Indicates the PR's author has not signed dco. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants