Skip to content

Commit

Permalink
storage: Rebalance based on logical bytes, not fraction of disk used
Browse files Browse the repository at this point in the history
Fixes #17691
  • Loading branch information
a-robinson committed Aug 17, 2017
1 parent 8cf2141 commit 764407c
Show file tree
Hide file tree
Showing 11 changed files with 294 additions and 142 deletions.
69 changes: 60 additions & 9 deletions c-deps/libroach/protos/cockroach/pkg/roachpb/metadata.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions c-deps/libroach/protos/cockroach/pkg/roachpb/metadata.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pkg/roachpb/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,12 @@ func (p Percentiles) String() string {

// String returns a string representation of the StoreCapacity.
func (sc StoreCapacity) String() string {
return fmt.Sprintf("diskUsed=%s/%s (%.2f%%), "+
return fmt.Sprintf("disk (capacity=%s, available=%s, logicalBytes=%s), "+
"ranges=%d, leases=%d, writes=%.2f, "+
"bytesPerReplica={%s}, writesPerReplica={%s}",
humanizeutil.IBytes(sc.Capacity-sc.Available), humanizeutil.IBytes(sc.Capacity),
sc.FractionUsed()*100, sc.RangeCount, sc.LeaseCount, sc.WritesPerSecond,
humanizeutil.IBytes(sc.Capacity), humanizeutil.IBytes(sc.Available),
humanizeutil.IBytes(sc.LogicalBytes),
sc.RangeCount, sc.LeaseCount, sc.WritesPerSecond,
sc.BytesPerReplica, sc.WritesPerReplica)
}

Expand Down
Loading

0 comments on commit 764407c

Please sign in to comment.