MM-58038: Use context to call master for DeletePost (#27098)
Calling app.DeletePost immediately after creating a post is susceptible to replica lag because we were calling the replica to check for the post. We fix this by passing a context to always query master. https://mattermost.atlassian.net/browse/MM-58038 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
09c0eb7e7a
Коммит
6f3327ce0f
@@ -322,7 +322,7 @@ func (scs *Service) handlePostError(postId string, task syncTask, rc *model.Remo
|
||||
}
|
||||
|
||||
// this post failed as part of a group of posts. Retry as an individual post.
|
||||
post, err := scs.server.GetStore().Post().GetSingle(postId, true)
|
||||
post, err := scs.server.GetStore().Post().GetSingle(request.EmptyContext(scs.server.Log()), postId, true)
|
||||
if err != nil {
|
||||
scs.server.Log().Log(mlog.LvlSharedChannelServiceError, "error fetching post for sync retry",
|
||||
mlog.String("remote", rc.DisplayName),
|
||||
|
||||
Ссылка в новой задаче
Block a user