Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
LLiuJJ committed Dec 12, 2024
1 parent ece5d15 commit 70907f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shardkvserver/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (cli *KvClient) Command(req *pb.CommandRequest) (string, error) {
if err != nil {
logger.ELogger().Sugar().Error("send command to server error", err.Error())
}
if resp.ErrCode == common.ErrCodeNoErr {
if resp != nil && resp.ErrCode == common.ErrCodeNoErr {
cli.commandId++
return resp.Value, nil
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func TestClusterRwBench(t *testing.T) {
// R-W test
shardKVCli := shardkvserver.MakeKvClient("127.0.0.1:8088,127.0.0.1:8089,127.0.0.1:8090")

N := 1000
N := 100
KeySize := 64
ValSize := 64
benchKvs := map[string]string{}
Expand Down

0 comments on commit 70907f9

Please sign in to comment.