From b2deb921ec8f13ac119a59e62db56b97a0e694e6 Mon Sep 17 00:00:00 2001 From: GroundWu <1175416256@qq.com> Date: Thu, 18 Jul 2024 11:59:15 +0800 Subject: [PATCH] fix panic caused by string is nil (#169) * fix panic caused by string is nil * remove print tableParam --- client/obclient.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/obclient.go b/client/obclient.go index ef9da19..24c4439 100644 --- a/client/obclient.go +++ b/client/obclient.go @@ -615,9 +615,10 @@ func (c *obClient) execute( // 1. Get table route tableParam, err := c.GetTableParam(ctx, tableName, rowKey) if err != nil { + isOdpMode := c.odpTable != nil log.Error("Runtime", ctx.Value(log.ObkvTraceIdName), "error occur in execute", - log.Int64("opType", int64(opType)), log.String("tableName", tableName), log.String("tableParam", tableParam.String())) - return nil, errors.WithMessagef(err, "get table param, tableName:%s, opType:%d", tableName, opType), needRetry + log.Int64("opType", int64(opType)), log.String("tableName", tableName), log.Bool("isOdpMode", isOdpMode)) + return nil, errors.WithMessagef(err, "get table param, tableName:%s, opType:%d, isOdpMode:%v", tableName, opType, isOdpMode), needRetry } // 2. Construct request.