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
feat(tablet): add uncompressed size to pb.Tablet #7095
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 6 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @NamanJain8 and @vvbalaji-dgraph)
worker/draft.go, line 1314 at r1 (raw file):
var total int64 tablets := make(map[string]*pb.Tablet) updateSize := func(pred string, onDiskSize int64, uncompressedSize int64) {
accept tinfo.
worker/draft.go, line 1349 at r1 (raw file):
// Count the table only if it is occupied by a single predicate. if left.Attr == right.Attr { updateSize(left.Attr, int64(tinfo.OnDiskSize), int64(tinfo.UncompressedSize))
Just pass in tinfo.
dgraph/cmd/zero/tablet.go
Outdated
msg := fmt.Sprintf("Going to move predicate: [%v], size: [%v] from group %d to %d\n", predicate, | ||
humanize.Bytes(uint64(tab.Space)), srcGroup, dstGroup) | ||
msg := fmt.Sprintf("Going to move predicate: [%v], size: [ondisk: %v, uncompressed: %v]"+ | ||
" from group %d to %d\n", predicate, humanize.Bytes(uint64(tab.OnDiskBytes)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
humanize.IBytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @NamanJain8 and @vvbalaji-dgraph)
pb.Tablet
denoting the uncompressed size of tablet.pb.Tablet.Space
->pb.Tablet.OnDiskBytes
/state
endpoint displays the tablet in format:Log in predicate move
This change is