diff --git a/go/chao-sdk-core/internal/conversation_msg/conversation_notification.go b/go/chao-sdk-core/internal/conversation_msg/conversation_notification.go index 2c83926..11cc42d 100644 --- a/go/chao-sdk-core/internal/conversation_msg/conversation_notification.go +++ b/go/chao-sdk-core/internal/conversation_msg/conversation_notification.go @@ -82,9 +82,9 @@ func (c *Conversation) doNotificationNew(c2v common.Cmd2Value) { err := syncFunc(ctx) duration := time.Since(startTime) if err != nil { - log.ZWarn(ctx, fmt.Sprintf("%s sync err", funcName), err, "duration", duration) + log.ZWarn(ctx, fmt.Sprintf("%s sync err", funcName), err, "duration", duration.Seconds()) } else { - log.ZDebug(ctx, fmt.Sprintf("%s completed successfully", funcName), "duration", duration) + log.ZDebug(ctx, fmt.Sprintf("%s completed successfully", funcName), "duration", duration.Seconds()) } } case constant.MsgSyncFailed: diff --git a/go/chao-sdk-core/internal/group/sdk.go b/go/chao-sdk-core/internal/group/sdk.go index e52851d..48535a7 100644 --- a/go/chao-sdk-core/internal/group/sdk.go +++ b/go/chao-sdk-core/internal/group/sdk.go @@ -16,6 +16,8 @@ package group import ( "context" + "github.com/openimsdk/tools/errs" + "gorm.io/gorm" "time" "github.com/openimsdk/tools/utils/datautil" @@ -271,6 +273,13 @@ func (g *Group) GetSpecifiedGroupMembersInfo(ctx context.Context, groupID string } func (g *Group) GetGroupMemberList(ctx context.Context, groupID string, filter, offset, count int32) ([]*model_struct.LocalGroupMember, error) { + _, err := g.db.GetVersionSync(ctx, g.groupAndMemberVersionTableName(), groupID) + if errs.Unwrap(err) == gorm.ErrRecordNotFound { + err := g.IncrSyncGroupAndMember(ctx, groupID) + if err != nil { + return nil, err + } + } dataFetcher := datafetcher.NewDataFetcher( g.db, g.groupAndMemberVersionTableName(), diff --git a/go/chao-sdk-core/internal/interaction/long_conn_mgr.go b/go/chao-sdk-core/internal/interaction/long_conn_mgr.go index 5869a8f..b89b608 100644 --- a/go/chao-sdk-core/internal/interaction/long_conn_mgr.go +++ b/go/chao-sdk-core/internal/interaction/long_conn_mgr.go @@ -496,7 +496,6 @@ func (c *LongConnMgr) reConn(ctx context.Context, num *int) (needRecon bool, err } c.connWrite.Lock() defer c.connWrite.Unlock() - log.ZDebug(ctx, "conn start") c.listener.OnConnecting() c.SetConnectionStatus(Connecting) url := fmt.Sprintf("%s?sendID=%s&token=%s&platformID=%d&operationID=%s&isBackground=%t", @@ -505,6 +504,7 @@ func (c *LongConnMgr) reConn(ctx context.Context, num *int) (needRecon bool, err if c.IsCompression { url += fmt.Sprintf("&compression=%s", "gzip") } + log.ZDebug(ctx, "conn start", "url", url) resp, err := c.conn.Dial(url, nil) if err != nil { c.SetConnectionStatus(Closed)