From 0f1208dba98ba6525bce7875bce6abbec0282d76 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 12 Dec 2022 19:22:50 +0800 Subject: [PATCH] mongo operation --- config/config.yaml | 5 +- internal/msg_transfer/logic/init.go | 5 + .../msg_transfer/logic/modify_msg_handler.go | 117 +++++++ .../logic/online_history_msg_handler.go | 19 +- .../logic/online_msg_to_mongo_handler.go | 44 --- pkg/base_info/msg.go | 9 + pkg/common/config/config.go | 13 +- pkg/common/db/extend_msg_mongo_model.go | 87 ++--- pkg/common/db/rocks_cache/rocks_cache.go | 4 +- pkg/proto/msg/msg.pb.go | 321 +++++++++++------- pkg/proto/msg/msg.proto | 7 + 11 files changed, 404 insertions(+), 227 deletions(-) create mode 100644 internal/msg_transfer/logic/modify_msg_handler.go diff --git a/config/config.yaml b/config/config.yaml index 9d452e0e1..a167d6b1b 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -62,12 +62,15 @@ kafka: ms2pschat: addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可 topic: "ms2ps_chat" #消息push + msgtomodify: + addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可 + topic: "msg_to_modify" consumergroupid: msgToTransfer: mongo msgToMongo: mongo_ex msgToMySql: mysql msgToPush: push - + msgToModify: modify #---------------Internal service configuration---------------------# diff --git a/internal/msg_transfer/logic/init.go b/internal/msg_transfer/logic/init.go index 201c6ee41..ebe0d1aa9 100644 --- a/internal/msg_transfer/logic/init.go +++ b/internal/msg_transfer/logic/init.go @@ -22,7 +22,9 @@ var ( persistentCH PersistentConsumerHandler historyCH OnlineHistoryRedisConsumerHandler historyMongoCH OnlineHistoryMongoConsumerHandler + modifyCH ModifyMsgConsumerHandler producer *kafka.Producer + producerToModify *kafka.Producer producerToMongo *kafka.Producer cmdCh chan Cmd2Value onlineTopicStatus int @@ -43,11 +45,13 @@ func Init() { persistentCH.Init() // ws2mschat save mysql historyCH.Init(cmdCh) // historyMongoCH.Init() + modifyCH.Init() onlineTopicStatus = OnlineTopicVacancy //offlineHistoryCH.Init(cmdCh) statistics.NewStatistics(&singleMsgSuccessCount, config.Config.ModuleName.MsgTransferName, fmt.Sprintf("%d second singleMsgCount insert to mongo", constant.StatisticsTimeInterval), constant.StatisticsTimeInterval) statistics.NewStatistics(&groupMsgCount, config.Config.ModuleName.MsgTransferName, fmt.Sprintf("%d second groupMsgCount insert to mongo", constant.StatisticsTimeInterval), constant.StatisticsTimeInterval) producer = kafka.NewKafkaProducer(config.Config.Kafka.Ms2pschat.Addr, config.Config.Kafka.Ms2pschat.Topic) + producerToModify = kafka.NewKafkaProducer(config.Config.Kafka.MsgToModify.Addr, config.Config.Kafka.MsgToModify.Topic) producerToMongo = kafka.NewKafkaProducer(config.Config.Kafka.MsgToMongo.Addr, config.Config.Kafka.MsgToMongo.Topic) } func Run(promethuesPort int) { @@ -59,6 +63,7 @@ func Run(promethuesPort int) { } go historyCH.historyConsumerGroup.RegisterHandleAndConsumer(&historyCH) go historyMongoCH.historyConsumerGroup.RegisterHandleAndConsumer(&historyMongoCH) + go modifyCH.modifyMsgConsumerGroup.RegisterHandleAndConsumer(&modifyCH) //go offlineHistoryCH.historyConsumerGroup.RegisterHandleAndConsumer(&offlineHistoryCH) go func() { err := promePkg.StartPromeSrv(promethuesPort) diff --git a/internal/msg_transfer/logic/modify_msg_handler.go b/internal/msg_transfer/logic/modify_msg_handler.go new file mode 100644 index 000000000..7b43e91aa --- /dev/null +++ b/internal/msg_transfer/logic/modify_msg_handler.go @@ -0,0 +1,117 @@ +package logic + +import ( + "Open_IM/pkg/base_info" + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/db" + kfk "Open_IM/pkg/common/kafka" + "Open_IM/pkg/common/log" + pbMsg "Open_IM/pkg/proto/msg" + server_api_params "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" + "encoding/json" + "github.com/Shopify/sarama" + + "github.com/golang/protobuf/proto" +) + +type ModifyMsgConsumerHandler struct { + msgHandle map[string]fcb + modifyMsgConsumerGroup *kfk.MConsumerGroup +} + +func (mmc *ModifyMsgConsumerHandler) Init() { + mmc.msgHandle = make(map[string]fcb) + mmc.msgHandle[config.Config.Kafka.MsgToModify.Topic] = mmc.ModifyMsg + mmc.modifyMsgConsumerGroup = kfk.NewMConsumerGroup(&kfk.MConsumerGroupConfig{KafkaVersion: sarama.V2_0_0_0, + OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false}, []string{config.Config.Kafka.MsgToModify.Topic}, + config.Config.Kafka.MsgToModify.Addr, config.Config.Kafka.ConsumerGroupID.MsgToModify) +} + +func (ModifyMsgConsumerHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } +func (ModifyMsgConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } +func (mmc *ModifyMsgConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, + claim sarama.ConsumerGroupClaim) error { + for msg := range claim.Messages() { + log.NewDebug("", "kafka get info to mysql", "ModifyMsgConsumerHandler", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value), "key", string(msg.Key)) + if len(msg.Value) != 0 { + mmc.msgHandle[msg.Topic](msg, string(msg.Key), sess) + } else { + log.Error("", "msg get from kafka but is nil", msg.Key) + } + sess.MarkMessage(msg, "") + } + return nil +} + +func (mmc *ModifyMsgConsumerHandler) ModifyMsg(cMsg *sarama.ConsumerMessage, msgKey string, _ sarama.ConsumerGroupSession) { + log.NewInfo("msg come here ModifyMsg!!!", "", "msg", string(cMsg.Value), msgKey) + msgFromMQ := pbMsg.MsgDataToModifyByMQ{} + err := proto.Unmarshal(cMsg.Value, &msgFromMQ) + if err != nil { + log.NewError(msgFromMQ.TriggerID, "msg_transfer Unmarshal msg err", "msg", string(cMsg.Value), "err", err.Error()) + return + } + log.Debug(msgFromMQ.TriggerID, "proto.Unmarshal MsgDataToMQ", msgFromMQ.String()) + for _, msgDataToMQ := range msgFromMQ.MessageList { + if msgDataToMQ.MsgData.ContentType == constant.ReactionMessageModifier { + notification := &base_info.ReactionMessageModifierNotification{} + if err := json.Unmarshal(msgDataToMQ.MsgData.Content, notification); err != nil { + continue + } + if notification.IsExternalExtensions { + log.NewInfo(msgDataToMQ.OperationID, "msg:", notification, "this is external extensions") + continue + } + if !notification.IsReact { + // first time to modify + var reactionExtensionList = make(map[string]db.KeyValue) + extendMsg := db.ExtendMsg{ + ReactionExtensionList: reactionExtensionList, + ClientMsgID: notification.ClientMsgID, + MsgFirstModifyTime: notification.MsgFirstModifyTime, + } + for _, v := range notification.SuccessReactionExtensionList { + reactionExtensionList[v.TypeKey] = db.KeyValue{ + TypeKey: v.TypeKey, + Value: v.Value, + LatestUpdateTime: v.LatestUpdateTime, + } + } + + if err := db.DB.InsertExtendMsg(notification.SourceID, notification.SessionType, &extendMsg); err != nil { + log.NewError(msgDataToMQ.OperationID, "MsgFirstModify InsertExtendMsg failed", notification.SourceID, notification.SessionType, extendMsg, err.Error()) + continue + } + } else { + var reactionExtensionList = make(map[string]*server_api_params.KeyValue) + for _, v := range notification.SuccessReactionExtensionList { + reactionExtensionList[v.TypeKey] = &server_api_params.KeyValue{ + TypeKey: v.TypeKey, + Value: v.Value, + LatestUpdateTime: v.LatestUpdateTime, + } + } + // is already modify + if err := db.DB.InsertOrUpdateReactionExtendMsgSet(notification.SourceID, notification.SessionType, notification.ClientMsgID, notification.MsgFirstModifyTime, reactionExtensionList); err != nil { + log.NewError(msgDataToMQ.OperationID, "InsertOrUpdateReactionExtendMsgSet failed") + } + } + } else if msgDataToMQ.MsgData.ContentType == constant.ReactionMessageDeleter { + notification := &base_info.ReactionMessageDeleteNotification{} + if err := json.Unmarshal(msgDataToMQ.MsgData.Content, notification); err != nil { + continue + } + if err := db.DB.DeleteReactionExtendMsgSet(notification.SourceID, notification.SessionType, notification.ClientMsgID, notification.MsgFirstModifyTime, notification.SuccessReactionExtensionList); err != nil { + log.NewError(msgDataToMQ.OperationID, "InsertOrUpdateReactionExtendMsgSet failed") + } + } + } + +} + +func UnMarshallSetReactionMsgContent(content []byte) (notification *base_info.ReactionMessageModifierNotification, err error) { + + return notification, nil +} diff --git a/internal/msg_transfer/logic/online_history_msg_handler.go b/internal/msg_transfer/logic/online_history_msg_handler.go index d50f451ee..af22e9259 100644 --- a/internal/msg_transfer/logic/online_history_msg_handler.go +++ b/internal/msg_transfer/logic/online_history_msg_handler.go @@ -72,6 +72,7 @@ func (och *OnlineHistoryRedisConsumerHandler) Run(channelID int) { storageMsgList := make([]*pbMsg.MsgDataToMQ, 0, 80) notStoragePushMsgList := make([]*pbMsg.MsgDataToMQ, 0, 80) log.Debug(triggerID, "msg arrived channel", "channel id", channelID, msgList, msgChannelValue.aggregationID, len(msgList)) + var modifyMsgList []*pbMsg.MsgDataToMQ for _, v := range msgList { log.Debug(triggerID, "msg come to storage center", v.String()) isHistory := utils.GetSwitchFromOptions(v.MsgData.Options, constant.IsHistory) @@ -85,8 +86,13 @@ func (och *OnlineHistoryRedisConsumerHandler) Run(channelID int) { } } + if v.MsgData.ContentType == constant.ReactionMessageModifier || v.MsgData.ContentType == constant.ReactionMessageDeleter { + modifyMsgList = append(modifyMsgList, v) + } + } + if len(modifyMsgList) > 0 { + sendMessageToModifyMQ(msgChannelValue.aggregationID, triggerID, modifyMsgList) } - //switch msgChannelValue.msg.MsgData.SessionType { //case constant.SingleChatType: //case constant.GroupChatType: @@ -552,6 +558,17 @@ func sendMessageToPushMQ(message *pbMsg.MsgDataToMQ, pushToUserID string) { return } +func sendMessageToModifyMQ(aggregationID string, triggerID string, messages []*pbMsg.MsgDataToMQ) { + if len(messages) > 0 { + pid, offset, err := producerToModify.SendMessage(&pbMsg.MsgDataToModifyByMQ{AggregationID: aggregationID, MessageList: messages, TriggerID: triggerID}, aggregationID, triggerID) + if err != nil { + log.Error(triggerID, "kafka send failed", "send data", len(messages), "pid", pid, "offset", offset, "err", err.Error(), "key", aggregationID) + } else { + // log.NewWarn(m.OperationID, "sendMsgToKafka client msgID ", m.MsgData.ClientMsgID) + } + } +} + // String hashes a string to a unique hashcode. // // crc32 returns a uint32, but for our use we need diff --git a/internal/msg_transfer/logic/online_msg_to_mongo_handler.go b/internal/msg_transfer/logic/online_msg_to_mongo_handler.go index cadc0669d..4a6362a05 100644 --- a/internal/msg_transfer/logic/online_msg_to_mongo_handler.go +++ b/internal/msg_transfer/logic/online_msg_to_mongo_handler.go @@ -61,50 +61,6 @@ func (mc *OnlineHistoryMongoConsumerHandler) handleChatWs2Mongo(cMsg *sarama.Con if unexistSeqList, err := db.DB.DelMsgBySeqList(DeleteMessageTips.UserID, DeleteMessageTips.SeqList, v.OperationID); err != nil { log.NewError(v.OperationID, utils.GetSelfFuncName(), "DelMsgBySeqList args: ", DeleteMessageTips.UserID, DeleteMessageTips.SeqList, v.OperationID, err.Error(), unexistSeqList) } - } else if v.MsgData.ContentType == constant.ReactionMessageModifier { - var req pbMsg.ModifyMessageReactionExtensionsReq - if req.IsExternalExtensions { - log.NewInfo(req.OperationID, "msg:", req.String(), "this is external extensions") - continue - } - if !req.IsReact { - // first time to modify - var reactionExtensionList = make(map[string]db.KeyValue) - for k, v := range req.ReactionExtensionList { - reactionExtensionList[k] = db.KeyValue{ - TypeKey: v.TypeKey, - Value: v.Value, - LatestUpdateTime: v.LatestUpdateTime, - } - } - extendMsg := db.ExtendMsg{ - ReactionExtensionList: reactionExtensionList, - ClientMsgID: req.ClientMsgID, - MsgFirstModifyTime: req.MsgFirstModifyTime, - } - if req.AttachedInfo != nil { - extendMsg.AttachedInfo = req.AttachedInfo.Value - } - if req.Ex != nil { - extendMsg.Ex = req.Ex.Value - } - if err := db.DB.InsertExtendMsg(req.SourceID, req.SessionType, &extendMsg); err != nil { - log.NewError(req.OperationID, "MsgFirstModify InsertExtendMsg failed", req.SourceID, req.SessionType, extendMsg, err.Error()) - continue - } - } else { - // is already modify - if err := db.DB.InsertOrUpdateReactionExtendMsgSet(req.SourceID, req.SessionType, req.ClientMsgID, req.MsgFirstModifyTime, req.ReactionExtensionList); err != nil { - log.NewError(req.OperationID, "InsertOrUpdateReactionExtendMsgSet failed") - } - } - } else if v.MsgData.ContentType == constant.ReactionMessageDeleter { - var req pbMsg.OperateMessageListReactionExtensionsReq - for _, v := range req.MessageReactionKeyList { - if err := db.DB.DeleteReactionExtendMsgSet(req.SourceID, req.SessionType, v.ClientMsgID, v.MsgFirstModifyTime, v.ReactionExtensionList); err != nil { - log.NewError(req.OperationID, "InsertOrUpdateReactionExtendMsgSet failed") - } - } } } } diff --git a/pkg/base_info/msg.go b/pkg/base_info/msg.go index bf02d311f..dbd4d1223 100644 --- a/pkg/base_info/msg.go +++ b/pkg/base_info/msg.go @@ -116,3 +116,12 @@ type ReactionMessageModifierNotification struct { IsExternalExtensions bool `json:"isExternalExtensions"` MsgFirstModifyTime int64 `json:"msgFirstModifyTime"` } + +type ReactionMessageDeleteNotification struct { + SourceID string `json:"sourceID" binding:"required"` + OpUserID string `json:"opUserID" binding:"required"` + SessionType int32 `json:"sessionType" binding:"required"` + SuccessReactionExtensionList map[string]*sdk_ws.KeyValue `json:"reactionExtensionList,omitempty" binding:"required"` + ClientMsgID string `json:"clientMsgID" binding:"required"` + MsgFirstModifyTime int64 `json:"msgFirstModifyTime"` +} diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index e1942a66d..20292251e 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -248,11 +248,16 @@ type config struct { Addr []string `yaml:"addr"` Topic string `yaml:"topic"` } + MsgToModify struct { + Addr []string `yaml:"addr"` + Topic string `yaml:"topic"` + } ConsumerGroupID struct { - MsgToRedis string `yaml:"msgToTransfer"` - MsgToMongo string `yaml:"msgToMongo"` - MsgToMySql string `yaml:"msgToMySql"` - MsgToPush string `yaml:"msgToPush"` + MsgToRedis string `yaml:"msgToTransfer"` + MsgToMongo string `yaml:"msgToMongo"` + MsgToMySql string `yaml:"msgToMySql"` + MsgToPush string `yaml:"msgToPush"` + MsgToModify string `yaml:"msgToModify"` } } Secret string `yaml:"secret"` diff --git a/pkg/common/db/extend_msg_mongo_model.go b/pkg/common/db/extend_msg_mongo_model.go index 29ab12c20..07d853418 100644 --- a/pkg/common/db/extend_msg_mongo_model.go +++ b/pkg/common/db/extend_msg_mongo_model.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "strconv" "strings" @@ -89,30 +90,41 @@ func (d *DataBases) GetAllExtendMsgSet(ID string, opts *GetAllExtendMsgSetOpts) return sets, nil } -type GetExtendMsgSetOpts struct { - ExcludeExtendMsgs bool +func (d *DataBases) GetExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, maxMsgUpdateTime int64, c *mongo.Collection) (*ExtendMsgSet, error) { + regex := fmt.Sprintf("^%s", sourceID) + var err error + findOpts := options.Find().SetLimit(1).SetSkip(0).SetSort(bson.M{"source_id": -1}).SetProjection(bson.M{"extend_msgs": 0}) + // update newest + find := bson.M{"source_id": primitive.Regex{Pattern: regex}, "session_type": sessionType} + if maxMsgUpdateTime > 0 { + find["max_msg_update_time"] = maxMsgUpdateTime + } + result, err := c.Find(ctx, find, findOpts) + if err != nil { + return nil, utils.Wrap(err, "") + } + var setList []ExtendMsgSet + if err := result.All(ctx, &setList); err != nil { + return nil, utils.Wrap(err, "") + } + if len(setList) == 0 { + return nil, nil + } + return &setList[0], nil } // first modify msg func (d *DataBases) InsertExtendMsg(sourceID string, sessionType int32, msg *ExtendMsg) error { ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cExtendMsgSet) - regex := fmt.Sprintf("^%s", sourceID) - var err error - findOpts := options.Find().SetLimit(1).SetSkip(0).SetSort(bson.M{"source_id": -1}).SetProjection(bson.M{"extend_msgs": 0}) - // update newest - result, err := c.Find(ctx, bson.M{"source_id": primitive.Regex{Pattern: regex}, "session_type": sessionType}, findOpts) + set, err := d.GetExtendMsgSet(ctx, sourceID, sessionType, 0, c) if err != nil { return utils.Wrap(err, "") } - var setList []ExtendMsgSet - if err := result.All(ctx, &setList); err != nil { - return utils.Wrap(err, "") - } - if len(setList) == 0 || setList[0].ExtendMsgNum >= GetExtendMsgMaxNum() { + if set == nil || set.ExtendMsgNum >= GetExtendMsgMaxNum() { var index int32 - if len(setList) > 0 { - index = SplitSourceIDAndGetIndex(setList[0].SourceID) + if set != nil { + index = SplitSourceIDAndGetIndex(set.SourceID) } err = d.CreateExtendMsgSet(&ExtendMsgSet{ SourceID: GetExtendMsgSourceID(sourceID, index), @@ -123,7 +135,7 @@ func (d *DataBases) InsertExtendMsg(sourceID string, sessionType int32, msg *Ext MaxMsgUpdateTime: msg.MsgFirstModifyTime, }) } else { - _, err = c.UpdateOne(ctx, bson.M{"source_id": setList[0].SourceID, "session_type": sessionType}, bson.M{"$set": bson.M{"max_msg_update_time": msg.MsgFirstModifyTime, "$inc": bson.M{"extend_msg_num": 1}, fmt.Sprintf("extend_msgs.%s", msg.ClientMsgID): msg}}) + _, err = c.UpdateOne(ctx, bson.M{"source_id": set.SourceID, "session_type": sessionType}, bson.M{"$set": bson.M{"max_msg_update_time": msg.MsgFirstModifyTime, "$inc": bson.M{"extend_msg_num": 1}, fmt.Sprintf("extend_msgs.%s", msg.ClientMsgID): msg}}) } return utils.Wrap(err, "") } @@ -140,47 +152,33 @@ func (d *DataBases) InsertOrUpdateReactionExtendMsgSet(sourceID string, sessionT opt := &options.UpdateOptions{ Upsert: &upsert, } - findOpts := options.Find().SetLimit(1).SetSkip(0).SetSort(bson.M{"source_id": -1}).SetProjection(bson.M{"extend_msgs": 0}) - regex := fmt.Sprintf("^%s", sourceID) - result, err := c.Find(ctx, bson.M{"source_id": primitive.Regex{Pattern: regex}, "session_type": sessionType, "max_msg_update_time": bson.M{"$lte": msgFirstModifyTime}}, findOpts) + set, err := d.GetExtendMsgSet(ctx, sourceID, sessionType, msgFirstModifyTime, c) if err != nil { return utils.Wrap(err, "") } - var setList []ExtendMsgSet - if err := result.All(ctx, &setList); err != nil { - return utils.Wrap(err, "") + if set == nil { + return errors.New(fmt.Sprintf("sourceID %s has no set", sourceID)) } - if len(setList) == 0 { - return utils.Wrap(errors.New("InsertOrUpdateReactionExtendMsgSet failed, len(setList) == 0"), "") - } - - _, err = c.UpdateOne(ctx, bson.M{"source_id": setList[0].SourceID, "session_type": sessionType}, bson.M{"$set": updateBson}, opt) + _, err = c.UpdateOne(ctx, bson.M{"source_id": set.SourceID, "session_type": sessionType}, bson.M{"$set": updateBson}, opt) return utils.Wrap(err, "") } // delete TypeKey -func (d *DataBases) DeleteReactionExtendMsgSet(sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList []*server_api_params.KeyValue) error { +func (d *DataBases) DeleteReactionExtendMsgSet(sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*server_api_params.KeyValue) error { ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cExtendMsgSet) var updateBson = bson.M{} for _, v := range reactionExtensionList { updateBson[fmt.Sprintf("extend_msgs.%s.%s", clientMsgID, v.TypeKey)] = "" } - - findOpts := options.Find().SetLimit(1).SetSkip(0).SetSort(bson.M{"source_id": -1}).SetProjection(bson.M{"extend_msgs": 0}) - regex := fmt.Sprintf("^%s", sourceID) - result, err := c.Find(ctx, bson.M{"source_id": primitive.Regex{Pattern: regex}, "session_type": sessionType, "max_msg_update_time": bson.M{"$lte": msgFirstModifyTime}}, findOpts) + set, err := d.GetExtendMsgSet(ctx, sourceID, sessionType, msgFirstModifyTime, c) if err != nil { return utils.Wrap(err, "") } - var setList []ExtendMsgSet - if err := result.All(ctx, &setList); err != nil { - return utils.Wrap(err, "") + if set == nil { + return errors.New(fmt.Sprintf("sourceID %s has no set", sourceID)) } - if len(setList) == 0 { - return utils.Wrap(errors.New("InsertOrUpdateReactionExtendMsgSet failed, len(setList) == 0"), "") - } - _, err = c.UpdateOne(ctx, bson.M{"source_id": setList[0].SourceID, "session_type": sessionType}, bson.M{"$unset": updateBson}) + _, err = c.UpdateOne(ctx, bson.M{"source_id": set.SourceID, "session_type": sessionType}, bson.M{"$unset": updateBson}) return err } @@ -189,16 +187,19 @@ func (d *DataBases) GetExtendMsg(sourceID string, sessionType int32, clientMsgID c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cExtendMsgSet) findOpts := options.Find().SetLimit(1).SetSkip(0).SetSort(bson.M{"source_id": -1}).SetProjection(bson.M{fmt.Sprintf("extend_msgs.%s", clientMsgID): 1}) regex := fmt.Sprintf("^%s", sourceID) - result, err := c.Find(ctx, bson.M{"source_id": primitive.Regex{Pattern: regex}, "session_type": sessionType, "msgFirstModifyTime": bson.M{"$lte": maxMsgUpdateTime}}, findOpts) + result, err := c.Find(ctx, bson.M{"source_id": primitive.Regex{Pattern: regex}, "session_type": sessionType, "max_msg_update_time": bson.M{"$lte": maxMsgUpdateTime}}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } - var extendMsgList []ExtendMsg - if err := result.All(ctx, &extendMsgList); err != nil { + var setList []ExtendMsgSet + if err := result.All(ctx, &setList); err != nil { return nil, utils.Wrap(err, "") } - if len(extendMsgList) == 0 { + if len(setList) == 0 { return nil, utils.Wrap(errors.New("GetExtendMsg failed, len(setList) == 0"), "") } - return &extendMsgList[0], nil + if v, ok := setList[0].ExtendMsgs[clientMsgID]; ok { + return &v, nil + } + return nil, errors.New(fmt.Sprintf("cant find client msg id: %s", clientMsgID)) } diff --git a/pkg/common/db/rocks_cache/rocks_cache.go b/pkg/common/db/rocks_cache/rocks_cache.go index 5ff836fd7..3b054d37f 100644 --- a/pkg/common/db/rocks_cache/rocks_cache.go +++ b/pkg/common/db/rocks_cache/rocks_cache.go @@ -567,9 +567,9 @@ func DelConversationFromCache(ownerUserID, conversationID string) error { return utils.Wrap(db.DB.Rc.TagAsDeleted(conversationCache+ownerUserID+":"+conversationID), "DelConversationFromCache err") } -func GetExtendMsg(sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (*db.ExtendMsg, error) { +func GetExtendMsg(sourceID string, sessionType int32, clientMsgID string, firstModifyTime int64) (*db.ExtendMsg, error) { getExtendMsg := func() (string, error) { - extendMsg, err := db.DB.GetExtendMsg(sourceID, sessionType, clientMsgID, maxMsgUpdateTime) + extendMsg, err := db.DB.GetExtendMsg(sourceID, sessionType, clientMsgID, firstModifyTime) if err != nil { return "", utils.Wrap(err, "GetExtendMsgList failed") } diff --git a/pkg/proto/msg/msg.pb.go b/pkg/proto/msg/msg.pb.go index 89d14cb63..7541696f1 100644 --- a/pkg/proto/msg/msg.pb.go +++ b/pkg/proto/msg/msg.pb.go @@ -38,7 +38,7 @@ func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*MsgDataToMQ) ProtoMessage() {} func (*MsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{0} + return fileDescriptor_msg_a1760b784e1ce32d, []int{0} } func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) @@ -91,7 +91,7 @@ func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } func (*MsgDataToDB) ProtoMessage() {} func (*MsgDataToDB) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{1} + return fileDescriptor_msg_a1760b784e1ce32d, []int{1} } func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) @@ -138,7 +138,7 @@ func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*PushMsgDataToMQ) ProtoMessage() {} func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{2} + return fileDescriptor_msg_a1760b784e1ce32d, []int{2} } func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) @@ -193,7 +193,7 @@ func (m *MsgDataToMongoByMQ) Reset() { *m = MsgDataToMongoByMQ{} } func (m *MsgDataToMongoByMQ) String() string { return proto.CompactTextString(m) } func (*MsgDataToMongoByMQ) ProtoMessage() {} func (*MsgDataToMongoByMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{3} + return fileDescriptor_msg_a1760b784e1ce32d, []int{3} } func (m *MsgDataToMongoByMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToMongoByMQ.Unmarshal(m, b) @@ -273,7 +273,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{4} + return fileDescriptor_msg_a1760b784e1ce32d, []int{4} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -321,7 +321,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{5} + return fileDescriptor_msg_a1760b784e1ce32d, []int{5} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -382,7 +382,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } func (*SendMsgReq) ProtoMessage() {} func (*SendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{6} + return fileDescriptor_msg_a1760b784e1ce32d, []int{6} } func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) @@ -438,7 +438,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } func (*SendMsgResp) ProtoMessage() {} func (*SendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{7} + return fileDescriptor_msg_a1760b784e1ce32d, []int{7} } func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) @@ -506,7 +506,7 @@ func (m *ClearMsgReq) Reset() { *m = ClearMsgReq{} } func (m *ClearMsgReq) String() string { return proto.CompactTextString(m) } func (*ClearMsgReq) ProtoMessage() {} func (*ClearMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{8} + return fileDescriptor_msg_a1760b784e1ce32d, []int{8} } func (m *ClearMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ClearMsgReq.Unmarshal(m, b) @@ -559,7 +559,7 @@ func (m *ClearMsgResp) Reset() { *m = ClearMsgResp{} } func (m *ClearMsgResp) String() string { return proto.CompactTextString(m) } func (*ClearMsgResp) ProtoMessage() {} func (*ClearMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{9} + return fileDescriptor_msg_a1760b784e1ce32d, []int{9} } func (m *ClearMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ClearMsgResp.Unmarshal(m, b) @@ -608,7 +608,7 @@ func (m *SetMsgMinSeqReq) Reset() { *m = SetMsgMinSeqReq{} } func (m *SetMsgMinSeqReq) String() string { return proto.CompactTextString(m) } func (*SetMsgMinSeqReq) ProtoMessage() {} func (*SetMsgMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{10} + return fileDescriptor_msg_a1760b784e1ce32d, []int{10} } func (m *SetMsgMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetMsgMinSeqReq.Unmarshal(m, b) @@ -675,7 +675,7 @@ func (m *SetMsgMinSeqResp) Reset() { *m = SetMsgMinSeqResp{} } func (m *SetMsgMinSeqResp) String() string { return proto.CompactTextString(m) } func (*SetMsgMinSeqResp) ProtoMessage() {} func (*SetMsgMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{11} + return fileDescriptor_msg_a1760b784e1ce32d, []int{11} } func (m *SetMsgMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetMsgMinSeqResp.Unmarshal(m, b) @@ -721,7 +721,7 @@ func (m *SetSendMsgStatusReq) Reset() { *m = SetSendMsgStatusReq{} } func (m *SetSendMsgStatusReq) String() string { return proto.CompactTextString(m) } func (*SetSendMsgStatusReq) ProtoMessage() {} func (*SetSendMsgStatusReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{12} + return fileDescriptor_msg_a1760b784e1ce32d, []int{12} } func (m *SetSendMsgStatusReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetSendMsgStatusReq.Unmarshal(m, b) @@ -767,7 +767,7 @@ func (m *SetSendMsgStatusResp) Reset() { *m = SetSendMsgStatusResp{} } func (m *SetSendMsgStatusResp) String() string { return proto.CompactTextString(m) } func (*SetSendMsgStatusResp) ProtoMessage() {} func (*SetSendMsgStatusResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{13} + return fileDescriptor_msg_a1760b784e1ce32d, []int{13} } func (m *SetSendMsgStatusResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetSendMsgStatusResp.Unmarshal(m, b) @@ -812,7 +812,7 @@ func (m *GetSendMsgStatusReq) Reset() { *m = GetSendMsgStatusReq{} } func (m *GetSendMsgStatusReq) String() string { return proto.CompactTextString(m) } func (*GetSendMsgStatusReq) ProtoMessage() {} func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{14} + return fileDescriptor_msg_a1760b784e1ce32d, []int{14} } func (m *GetSendMsgStatusReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSendMsgStatusReq.Unmarshal(m, b) @@ -852,7 +852,7 @@ func (m *GetSendMsgStatusResp) Reset() { *m = GetSendMsgStatusResp{} } func (m *GetSendMsgStatusResp) String() string { return proto.CompactTextString(m) } func (*GetSendMsgStatusResp) ProtoMessage() {} func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{15} + return fileDescriptor_msg_a1760b784e1ce32d, []int{15} } func (m *GetSendMsgStatusResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSendMsgStatusResp.Unmarshal(m, b) @@ -907,7 +907,7 @@ func (m *DelSuperGroupMsgReq) Reset() { *m = DelSuperGroupMsgReq{} } func (m *DelSuperGroupMsgReq) String() string { return proto.CompactTextString(m) } func (*DelSuperGroupMsgReq) ProtoMessage() {} func (*DelSuperGroupMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{16} + return fileDescriptor_msg_a1760b784e1ce32d, []int{16} } func (m *DelSuperGroupMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DelSuperGroupMsgReq.Unmarshal(m, b) @@ -967,7 +967,7 @@ func (m *DelSuperGroupMsgResp) Reset() { *m = DelSuperGroupMsgResp{} } func (m *DelSuperGroupMsgResp) String() string { return proto.CompactTextString(m) } func (*DelSuperGroupMsgResp) ProtoMessage() {} func (*DelSuperGroupMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{17} + return fileDescriptor_msg_a1760b784e1ce32d, []int{17} } func (m *DelSuperGroupMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DelSuperGroupMsgResp.Unmarshal(m, b) @@ -1014,7 +1014,7 @@ func (m *GetSuperGroupMsgReq) Reset() { *m = GetSuperGroupMsgReq{} } func (m *GetSuperGroupMsgReq) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupMsgReq) ProtoMessage() {} func (*GetSuperGroupMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{18} + return fileDescriptor_msg_a1760b784e1ce32d, []int{18} } func (m *GetSuperGroupMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSuperGroupMsgReq.Unmarshal(m, b) @@ -1068,7 +1068,7 @@ func (m *GetSuperGroupMsgResp) Reset() { *m = GetSuperGroupMsgResp{} } func (m *GetSuperGroupMsgResp) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupMsgResp) ProtoMessage() {} func (*GetSuperGroupMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{19} + return fileDescriptor_msg_a1760b784e1ce32d, []int{19} } func (m *GetSuperGroupMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSuperGroupMsgResp.Unmarshal(m, b) @@ -1121,7 +1121,7 @@ func (m *GetWriteDiffMsgReq) Reset() { *m = GetWriteDiffMsgReq{} } func (m *GetWriteDiffMsgReq) String() string { return proto.CompactTextString(m) } func (*GetWriteDiffMsgReq) ProtoMessage() {} func (*GetWriteDiffMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{20} + return fileDescriptor_msg_a1760b784e1ce32d, []int{20} } func (m *GetWriteDiffMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetWriteDiffMsgReq.Unmarshal(m, b) @@ -1168,7 +1168,7 @@ func (m *GetWriteDiffMsgResp) Reset() { *m = GetWriteDiffMsgResp{} } func (m *GetWriteDiffMsgResp) String() string { return proto.CompactTextString(m) } func (*GetWriteDiffMsgResp) ProtoMessage() {} func (*GetWriteDiffMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{21} + return fileDescriptor_msg_a1760b784e1ce32d, []int{21} } func (m *GetWriteDiffMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetWriteDiffMsgResp.Unmarshal(m, b) @@ -1230,7 +1230,7 @@ func (m *ModifyMessageReactionExtensionsReq) Reset() { *m = ModifyMessag func (m *ModifyMessageReactionExtensionsReq) String() string { return proto.CompactTextString(m) } func (*ModifyMessageReactionExtensionsReq) ProtoMessage() {} func (*ModifyMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{22} + return fileDescriptor_msg_a1760b784e1ce32d, []int{22} } func (m *ModifyMessageReactionExtensionsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ModifyMessageReactionExtensionsReq.Unmarshal(m, b) @@ -1348,7 +1348,7 @@ func (m *SetMessageReactionExtensionsReq) Reset() { *m = SetMessageReact func (m *SetMessageReactionExtensionsReq) String() string { return proto.CompactTextString(m) } func (*SetMessageReactionExtensionsReq) ProtoMessage() {} func (*SetMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{23} + return fileDescriptor_msg_a1760b784e1ce32d, []int{23} } func (m *SetMessageReactionExtensionsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetMessageReactionExtensionsReq.Unmarshal(m, b) @@ -1461,7 +1461,7 @@ func (m *SetMessageReactionExtensionsResp) Reset() { *m = SetMessageReac func (m *SetMessageReactionExtensionsResp) String() string { return proto.CompactTextString(m) } func (*SetMessageReactionExtensionsResp) ProtoMessage() {} func (*SetMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{24} + return fileDescriptor_msg_a1760b784e1ce32d, []int{24} } func (m *SetMessageReactionExtensionsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetMessageReactionExtensionsResp.Unmarshal(m, b) @@ -1537,7 +1537,7 @@ func (m *ModifyMessageReactionExtensionsResp) Reset() { *m = ModifyMessa func (m *ModifyMessageReactionExtensionsResp) String() string { return proto.CompactTextString(m) } func (*ModifyMessageReactionExtensionsResp) ProtoMessage() {} func (*ModifyMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{25} + return fileDescriptor_msg_a1760b784e1ce32d, []int{25} } func (m *ModifyMessageReactionExtensionsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ModifyMessageReactionExtensionsResp.Unmarshal(m, b) @@ -1602,7 +1602,7 @@ func (m *OperateMessageListReactionExtensionsReq) Reset() { func (m *OperateMessageListReactionExtensionsReq) String() string { return proto.CompactTextString(m) } func (*OperateMessageListReactionExtensionsReq) ProtoMessage() {} func (*OperateMessageListReactionExtensionsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{26} + return fileDescriptor_msg_a1760b784e1ce32d, []int{26} } func (m *OperateMessageListReactionExtensionsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OperateMessageListReactionExtensionsReq.Unmarshal(m, b) @@ -1674,7 +1674,7 @@ func (m *OperateMessageListReactionExtensionsReq_MessageReactionKey) String() st } func (*OperateMessageListReactionExtensionsReq_MessageReactionKey) ProtoMessage() {} func (*OperateMessageListReactionExtensionsReq_MessageReactionKey) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{26, 0} + return fileDescriptor_msg_a1760b784e1ce32d, []int{26, 0} } func (m *OperateMessageListReactionExtensionsReq_MessageReactionKey) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OperateMessageListReactionExtensionsReq_MessageReactionKey.Unmarshal(m, b) @@ -1731,7 +1731,7 @@ func (m *OperateMessageListReactionExtensionsResp) Reset() { func (m *OperateMessageListReactionExtensionsResp) String() string { return proto.CompactTextString(m) } func (*OperateMessageListReactionExtensionsResp) ProtoMessage() {} func (*OperateMessageListReactionExtensionsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{27} + return fileDescriptor_msg_a1760b784e1ce32d, []int{27} } func (m *OperateMessageListReactionExtensionsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OperateMessageListReactionExtensionsResp.Unmarshal(m, b) @@ -1792,7 +1792,7 @@ func (m *ExtendMsgResp) Reset() { *m = ExtendMsgResp{} } func (m *ExtendMsgResp) String() string { return proto.CompactTextString(m) } func (*ExtendMsgResp) ProtoMessage() {} func (*ExtendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{28} + return fileDescriptor_msg_a1760b784e1ce32d, []int{28} } func (m *ExtendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ExtendMsgResp.Unmarshal(m, b) @@ -1848,7 +1848,7 @@ func (m *ExtendMsg) Reset() { *m = ExtendMsg{} } func (m *ExtendMsg) String() string { return proto.CompactTextString(m) } func (*ExtendMsg) ProtoMessage() {} func (*ExtendMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{29} + return fileDescriptor_msg_a1760b784e1ce32d, []int{29} } func (m *ExtendMsg) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ExtendMsg.Unmarshal(m, b) @@ -1916,7 +1916,7 @@ func (m *KeyValueResp) Reset() { *m = KeyValueResp{} } func (m *KeyValueResp) String() string { return proto.CompactTextString(m) } func (*KeyValueResp) ProtoMessage() {} func (*KeyValueResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_489179134d252ef4, []int{30} + return fileDescriptor_msg_a1760b784e1ce32d, []int{30} } func (m *KeyValueResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KeyValueResp.Unmarshal(m, b) @@ -1957,6 +1957,60 @@ func (m *KeyValueResp) GetErrMsg() string { return "" } +type MsgDataToModifyByMQ struct { + AggregationID string `protobuf:"bytes,1,opt,name=aggregationID" json:"aggregationID,omitempty"` + MessageList []*MsgDataToMQ `protobuf:"bytes,2,rep,name=messageList" json:"messageList,omitempty"` + TriggerID string `protobuf:"bytes,3,opt,name=triggerID" json:"triggerID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToModifyByMQ) Reset() { *m = MsgDataToModifyByMQ{} } +func (m *MsgDataToModifyByMQ) String() string { return proto.CompactTextString(m) } +func (*MsgDataToModifyByMQ) ProtoMessage() {} +func (*MsgDataToModifyByMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_a1760b784e1ce32d, []int{31} +} +func (m *MsgDataToModifyByMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToModifyByMQ.Unmarshal(m, b) +} +func (m *MsgDataToModifyByMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToModifyByMQ.Marshal(b, m, deterministic) +} +func (dst *MsgDataToModifyByMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToModifyByMQ.Merge(dst, src) +} +func (m *MsgDataToModifyByMQ) XXX_Size() int { + return xxx_messageInfo_MsgDataToModifyByMQ.Size(m) +} +func (m *MsgDataToModifyByMQ) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToModifyByMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToModifyByMQ proto.InternalMessageInfo + +func (m *MsgDataToModifyByMQ) GetAggregationID() string { + if m != nil { + return m.AggregationID + } + return "" +} + +func (m *MsgDataToModifyByMQ) GetMessageList() []*MsgDataToMQ { + if m != nil { + return m.MessageList + } + return nil +} + +func (m *MsgDataToModifyByMQ) GetTriggerID() string { + if m != nil { + return m.TriggerID + } + return "" +} + func init() { proto.RegisterType((*MsgDataToMQ)(nil), "msg.MsgDataToMQ") proto.RegisterType((*MsgDataToDB)(nil), "msg.MsgDataToDB") @@ -1993,6 +2047,7 @@ func init() { proto.RegisterType((*ExtendMsg)(nil), "msg.ExtendMsg") proto.RegisterMapType((map[string]*KeyValueResp)(nil), "msg.ExtendMsg.ReactionExtensionListEntry") proto.RegisterType((*KeyValueResp)(nil), "msg.KeyValueResp") + proto.RegisterType((*MsgDataToModifyByMQ)(nil), "msg.MsgDataToModifyByMQ") } // Reference imports to suppress errors if they are not otherwise used. @@ -2531,105 +2586,107 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "msg/msg.proto", } -func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_489179134d252ef4) } +func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_a1760b784e1ce32d) } -var fileDescriptor_msg_489179134d252ef4 = []byte{ - // 1548 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4f, 0x73, 0xdb, 0x44, - 0x14, 0x1f, 0x59, 0xb1, 0x93, 0x3c, 0x27, 0x4d, 0xba, 0x4d, 0x83, 0xaa, 0x66, 0xa6, 0x46, 0xb4, - 0xd4, 0x85, 0xd6, 0x19, 0x02, 0x33, 0x65, 0xe8, 0x81, 0x36, 0x75, 0x70, 0x33, 0x45, 0xa4, 0x91, - 0x03, 0xcc, 0xc0, 0x21, 0x55, 0xed, 0x8d, 0xaa, 0x89, 0x2d, 0x29, 0x5a, 0xa9, 0x89, 0x61, 0x28, - 0x27, 0x4e, 0x0c, 0x07, 0xb8, 0x71, 0xe2, 0xc6, 0x77, 0xe0, 0xc8, 0x85, 0x2b, 0x77, 0xbe, 0x02, - 0x5f, 0x82, 0xd9, 0x5d, 0xd9, 0x5e, 0xfd, 0x8b, 0x15, 0x97, 0xe9, 0x94, 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0xf6, 0x18, 0x56, - 0x5a, 0xff, 0x4a, 0x08, 0x02, 0x48, 0x39, 0x06, 0xf2, 0x3b, 0x09, 0x2e, 0x34, 0x71, 0xaf, 0x1d, - 0x7a, 0xd8, 0x6f, 0xd1, 0x2a, 0x47, 0x3c, 0x16, 0xeb, 0x25, 0x25, 0xf8, 0x3a, 0xe6, 0x4d, 0x29, - 0x8f, 0x37, 0x72, 0x9c, 0x37, 0x13, 0xf9, 0x41, 0x93, 0x9d, 0x0e, 0x63, 0xaa, 0x64, 0x77, 0x78, - 0xb2, 0x93, 0x80, 0x26, 0xf3, 0x60, 0x19, 0x64, 0xca, 0xec, 0x12, 0x63, 0x36, 0xfd, 0x99, 0x0f, - 0x48, 0x7b, 0xce, 0x0b, 0xf3, 0xe2, 0xe1, 0x4e, 0xb9, 0x2f, 0x3e, 0x60, 0xcd, 0xe5, 0x73, 0xdf, - 0x0e, 0x70, 0xd3, 0x3e, 0x38, 0x98, 0x1e, 0xa3, 0xf6, 0x0d, 0x4b, 0x57, 0xdc, 0xd3, 0x4b, 0x04, - 0xf2, 0x63, 0x19, 0x34, 0xdd, 0xed, 0xda, 0x07, 0x03, 0x9d, 0x77, 0x56, 0x03, 0x9b, 0x1d, 0x1a, - 0xec, 0xd6, 0x49, 0x80, 0x1d, 0x62, 0xbb, 0x4e, 0xc1, 0xaf, 0x98, 0xee, 0xd1, 0x6e, 0xe8, 0x77, - 0xf0, 0x78, 0x83, 0x1d, 0xca, 0x31, 0x32, 0xcb, 0xe9, 0xcd, 0x97, 0x60, 0x42, 0x17, 0xda, 0x1b, - 0x78, 0x98, 0x51, 0xb3, 0x6c, 0x88, 0x2a, 0x74, 0x02, 0x17, 0xfd, 0x64, 0x50, 0xec, 0x90, 0x50, - 0x66, 0x87, 0x84, 0x4d, 0x7e, 0x48, 0x98, 0x88, 0xa1, 0x61, 0x64, 0x39, 0xd9, 0x72, 0x02, 0x7f, - 0x60, 0x64, 0x2f, 0x90, 0xec, 0x4c, 0x95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0x72, 0xe1, 0xa9, 0x4a, 0x3d, 0x9f, 0xd0, 0x10, - 0x0f, 0xdd, 0x81, 0x05, 0xf1, 0x25, 0x06, 0xad, 0x8c, 0x8e, 0x92, 0xc2, 0xbb, 0x91, 0x7a, 0x31, - 0x43, 0xcb, 0xc3, 0x4e, 0xbe, 0x97, 0x44, 0x61, 0x67, 0xbc, 0xcb, 0x44, 0x61, 0x67, 0x3e, 0xb0, - 0xb4, 0x60, 0xb9, 0x95, 0xed, 0xa8, 0x95, 0xeb, 0xa8, 0x75, 0x8a, 0xa3, 0x8c, 0x44, 0x66, 0xbc, - 0x10, 0x08, 0x8e, 0x52, 0x89, 0x6c, 0x32, 0x96, 0x8b, 0x97, 0x64, 0xf4, 0xda, 0xd0, 0x3a, 0x71, - 0x09, 0x57, 0x95, 0xec, 0x01, 0xe2, 0xa1, 0x43, 0x58, 0x3b, 0xed, 0x20, 0x87, 0xae, 0x16, 0x39, - 0xb8, 0xab, 0xd7, 0x0a, 0x58, 0x11, 0x0f, 0x7d, 0x0b, 0xb5, 0xd6, 0xc8, 0x26, 0xbb, 0x45, 0xa1, - 0x9b, 0x67, 0x69, 0xf0, 0xea, 0xad, 0x33, 0x58, 0x13, 0x0f, 0x1d, 0xc1, 0xda, 0xbd, 0x6e, 0x37, - 0x1f, 0xed, 0xf5, 0x82, 0xf7, 0x66, 0xb5, 0x5e, 0xcc, 0x90, 0x78, 0xe8, 0x39, 0x5c, 0x69, 0xe2, - 0x1e, 0x1e, 0x45, 0xf7, 0x92, 0x21, 0x6f, 0x5e, 0xfe, 0xe2, 0xd2, 0x8e, 0x87, 0x9d, 0xfd, 0x6d, - 0x5d, 0xf8, 0xeb, 0xa8, 0x4f, 0xac, 0x3b, 0x7d, 0x62, 0x3d, 0xa9, 0x30, 0xf1, 0xdd, 0x7f, 0x02, - 0x00, 0x00, 0xff, 0xff, 0xa6, 0x82, 0xfe, 0x0e, 0xa3, 0x1a, 0x00, 0x00, +var fileDescriptor_msg_a1760b784e1ce32d = []byte{ + // 1577 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4f, 0x6f, 0xdb, 0xc6, + 0x12, 0x07, 0x49, 0x4b, 0xb6, 0x47, 0x76, 0xec, 0xac, 0x1d, 0x3f, 0x86, 0x31, 0x10, 0x3d, 0xbe, + 0xe4, 0x45, 0x79, 0x2f, 0x91, 0x51, 0xb7, 0x40, 0x8a, 0xe6, 0xd0, 0xc4, 0x91, 0xab, 0x18, 0x29, + 0xeb, 0x98, 0x72, 0x5b, 0xa0, 0x3d, 0x38, 0x8c, 0xb4, 0x66, 0x08, 0x4b, 0x24, 0xcd, 0xa5, 0x62, + 0xab, 0x45, 0xd3, 0x53, 0x4f, 0x45, 0x0e, 0xed, 0xad, 0xa7, 0xde, 0xfa, 0x1d, 0x7a, 0xec, 0xa5, + 0xd7, 0xde, 0xfb, 0x15, 0xfa, 0x25, 0x8a, 0xdd, 0xa5, 0xa4, 0xe5, 0x3f, 0x8b, 0x56, 0x8a, 0x20, + 0x05, 0x7a, 0xd3, 0xec, 0xce, 0xce, 0xce, 0x6f, 0xe6, 0xc7, 0x9d, 0xdd, 0x11, 0x2c, 0xf6, 0x88, + 0xbd, 0xd1, 0x23, 0x76, 0xdd, 0x0f, 0xbc, 0xd0, 0x43, 0x4a, 0x8f, 0xd8, 0x5a, 0x6d, 0xd7, 0xc7, + 0xee, 0xed, 0x1d, 0xe3, 0x76, 0x0b, 0x07, 0xcf, 0x71, 0xb0, 0xe1, 0x1f, 0xd9, 0x1b, 0x6c, 0x7a, + 0x83, 0x74, 0x8e, 0x0e, 0x4e, 0xc8, 0xc6, 0x09, 0xe1, 0xea, 0x5a, 0x7d, 0xa2, 0x66, 0x60, 0xf9, + 0x3e, 0x0e, 0x22, 0x7d, 0xfd, 0x4b, 0xa8, 0x18, 0xc4, 0x6e, 0x58, 0xa1, 0xb5, 0xef, 0x19, 0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0x64, 0xf0, 0x94, 0xf4, + 0x47, 0x78, 0x0f, 0x16, 0xc6, 0x9b, 0x4c, 0x13, 0x06, 0xfd, 0x07, 0x09, 0x96, 0x5a, 0x98, 0xe2, + 0x89, 0x71, 0x31, 0xd3, 0x57, 0x15, 0x66, 0xed, 0xc0, 0xeb, 0xfb, 0x23, 0x57, 0x87, 0x22, 0x5d, + 0xd1, 0xe3, 0x14, 0x89, 0xa8, 0xc3, 0xa5, 0x24, 0x82, 0x99, 0x74, 0xfa, 0x45, 0xfc, 0xa5, 0x38, + 0x7e, 0xbd, 0x01, 0xcb, 0x71, 0xd7, 0xa6, 0x42, 0xb8, 0x0b, 0x2b, 0x2d, 0x1c, 0x46, 0x64, 0x69, + 0x85, 0x56, 0xd8, 0x27, 0x66, 0xda, 0x35, 0x29, 0xed, 0xda, 0x1a, 0x94, 0x09, 0x53, 0x67, 0x06, + 0x4b, 0x66, 0x24, 0xe9, 0x0f, 0x61, 0x35, 0x6d, 0x70, 0x2a, 0xd7, 0xee, 0xb0, 0x4f, 0xf7, 0xfc, + 0xae, 0xe9, 0x4f, 0x60, 0xb5, 0xf9, 0x97, 0xb8, 0x20, 0x80, 0x54, 0x62, 0x20, 0xbf, 0x91, 0x60, + 0xa5, 0x81, 0xbb, 0xad, 0xbe, 0x8f, 0x83, 0x26, 0xcd, 0x72, 0xc4, 0x63, 0x31, 0x5f, 0x52, 0x82, + 0xaf, 0x63, 0xde, 0xc8, 0x79, 0xbc, 0x51, 0xe2, 0xbc, 0x99, 0xc8, 0x0f, 0x1a, 0xec, 0xb4, 0x1b, + 0x53, 0x05, 0xbb, 0xcd, 0x83, 0x9d, 0x04, 0x34, 0x99, 0x07, 0xcb, 0xa0, 0x50, 0x66, 0xcb, 0x8c, + 0xd9, 0xf4, 0x67, 0x3e, 0x20, 0xfd, 0x05, 0x4f, 0xcc, 0xab, 0xbb, 0x3b, 0xe5, 0xb9, 0xf8, 0x90, + 0x15, 0x97, 0x4f, 0x03, 0x27, 0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0x50, + 0x2a, 0x90, 0x0d, 0xc6, 0x72, 0xf1, 0xd1, 0x8e, 0xfe, 0x35, 0xd4, 0x4e, 0x34, 0x05, 0x34, 0x35, + 0x7b, 0x82, 0xf8, 0xe8, 0x08, 0xd6, 0xcf, 0xba, 0x58, 0xa2, 0x6b, 0x45, 0x1e, 0x12, 0xda, 0xf5, + 0x02, 0x5a, 0xc4, 0x47, 0x5f, 0x43, 0xb5, 0x39, 0xd2, 0xc9, 0x2e, 0x99, 0xe8, 0xd6, 0x79, 0x2e, + 0x1c, 0xda, 0xed, 0x73, 0x68, 0x13, 0x1f, 0x1d, 0xc3, 0xfa, 0xfd, 0x4e, 0x27, 0x1f, 0xed, 0x8d, + 0x82, 0xef, 0x78, 0xad, 0x56, 0x4c, 0x91, 0xf8, 0xe8, 0x05, 0x5c, 0x6d, 0xe0, 0x2e, 0x1e, 0x79, + 0xf7, 0x9a, 0x21, 0x6f, 0x5d, 0xf9, 0xec, 0xf2, 0xae, 0x8f, 0xdd, 0x83, 0x1d, 0x43, 0xf8, 0x2b, + 0xab, 0x47, 0xec, 0xbb, 0x3d, 0x62, 0x3f, 0x2d, 0x33, 0xf1, 0xed, 0x3f, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x57, 0xed, 0x19, 0x89, 0x33, 0x1b, 0x00, 0x00, } diff --git a/pkg/proto/msg/msg.proto b/pkg/proto/msg/msg.proto index c02824c86..e9f75b039 100644 --- a/pkg/proto/msg/msg.proto +++ b/pkg/proto/msg/msg.proto @@ -236,6 +236,13 @@ message KeyValueResp { string errMsg = 3; } +message MsgDataToModifyByMQ{ + string aggregationID = 1; + repeated MsgDataToMQ messageList = 2; + string triggerID = 3; +} + + service msg { rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp); rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp);