[MM-36268] Fix replication lag error on post reply (#17752)

* Fix replication lag error on post reply

* Improve further by using a db transaction
Этот коммит содержится в:
Claudio Costa
2021-06-16 16:45:34 +02:00
коммит произвёл GitHub
родитель d093e102a4
Коммит 6483abd263
11 изменённых файлов: 220 добавлений и 65 удалений

Просмотреть файл

@@ -282,7 +282,7 @@ func generateLayer(name, templateFile string) ([]byte, error) {
paramsWithType := []string{}
for _, param := range params {
switch param.Type {
case "ChannelSearchOpts", "UserGetByIdsOpts":
case "ChannelSearchOpts", "UserGetByIdsOpts", "ThreadMembershipOpts":
paramsWithType = append(paramsWithType, fmt.Sprintf("%s store.%s", param.Name, param.Type))
case "*UserGetByIdsOpts":
paramsWithType = append(paramsWithType, fmt.Sprintf("%s *store.UserGetByIdsOpts", param.Name))
@@ -296,7 +296,7 @@ func generateLayer(name, templateFile string) ([]byte, error) {
paramsWithType := []string{}
for _, param := range params {
switch param.Type {
case "ChannelSearchOpts", "UserGetByIdsOpts":
case "ChannelSearchOpts", "UserGetByIdsOpts", "ThreadMembershipOpts":
paramsWithType = append(paramsWithType, fmt.Sprintf("%s store.%s", param.Name, param.Type))
case "*UserGetByIdsOpts":
paramsWithType = append(paramsWithType, fmt.Sprintf("%s *store.UserGetByIdsOpts", param.Name))