Skip to content

Commit

Permalink
Address the comments
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato committed Nov 30, 2023
1 parent 19a6c3f commit 259b48d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions client/http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ func (c *client) GetRegionsByStoreID(ctx context.Context, storeID uint64) (*Regi
}

// GetRegionsReplicatedStateByKeyRange gets the regions replicated state info by key range.
// The keys in the key range should be encoded in the hex bytes format (without encoding to the UTF-8 bytes).
func (c *client) GetRegionsReplicatedStateByKeyRange(ctx context.Context, keyRange *KeyRange) (string, error) {
var state string
err := c.requestWithRetry(ctx,
Expand Down Expand Up @@ -411,6 +412,7 @@ func (c *client) GetHistoryHotRegions(ctx context.Context, req *HistoryHotRegion
}

// GetRegionStatusByKeyRange gets the region status by key range.
// If the `onlyCount` flag is true, the result will only include the count of regions.
// The keys in the key range should be encoded in the UTF-8 bytes format.
func (c *client) GetRegionStatusByKeyRange(ctx context.Context, keyRange *KeyRange, onlyCount bool) (*RegionStats, error) {
var regionStats RegionStats
Expand Down
2 changes: 1 addition & 1 deletion client/http/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func decodeBytes(b []byte) ([]byte, error) {
return buf, nil
}

// keyToKeyHexStr converts a raw key to a hex string after encoding.
// rawKeyToKeyHexStr converts a raw key to a hex string after encoding.
func rawKeyToKeyHexStr(key []byte) string {
if len(key) == 0 {
return ""

Check warning on line 106 in client/http/codec.go

View check run for this annotation

Codecov / codecov/patch

client/http/codec.go#L106

Added line #L106 was not covered by tests
Expand Down

0 comments on commit 259b48d

Please sign in to comment.