Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/region in the API may return a huge written_keys #3379

Closed
HunDunDM opened this issue Jan 22, 2021 · 1 comment
Closed

/region in the API may return a huge written_keys #3379

HunDunDM opened this issue Jan 22, 2021 · 1 comment
Assignees
Labels
severity/moderate The issue's severity is moderate. type/bug The issue is confirmed as a bug.

Comments

@HunDunDM
Copy link
Member

HunDunDM commented Jan 22, 2021

Bug Report

/region in the API returned a result as follows

{
	"id": 29031958,
	"start_key": "******",
	"end_key": "******",
	"epoch": {
		"conf_ver": 1204,
		"version": 33785
	},
	"peers": [{
		"id": 29031959,
		"store_id": 5678246
	}, {
		"id": 29031960,
		"store_id": 1
	}, {
		"id": 29031961,
		"store_id": 5678148
	}],
	"leader": {
		"id": 29031961,
		"store_id": 5678148
	},
	"pending_peers": [{
		"id": 29031960,
		"store_id": 1
	}],
	"written_bytes": 18446744073709550591,
	"read_bytes": 0,
	"written_keys": 18446744073709551615,
	"read_keys": 0,
	"approximate_size": 93,
	"approximate_keys": 504338
}

What did you do?

  • pd-ctl region

What did you expect to see?

  • This is a cold region and should have smaller written_bytes.

What did you see instead?

  • written_bytes = 18446744073709550591 = uint64(-1024)
  • written_keys = 18446744073709551615 = uint64(-1)

Other information that may be useful

  • The information may not be updated for a long time
  • In TiDB code, the type of this field is int64, which will cause the following error.
    • json: cannot unmarshal number 18446744073709550591 into Go struct field .written_bytes of type int64
  • This data comes from TiKV's region heartbeat data.

What version of PD are you using (pd-server -V)?

  • v4.0.9
@rleungx
Copy link
Member

rleungx commented Jun 7, 2021

Fixed by tikv/tikv#10119

@rleungx rleungx closed this as completed Jun 7, 2021
@JmPotato JmPotato moved this from Need Triage to Closed in Questions and Bug Reports Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate The issue's severity is moderate. type/bug The issue is confirmed as a bug.
Projects
Development

No branches or pull requests

3 participants