MM-62077: Fix cluster broadcast for LRU caches (#29488)
We were incorrectly not broadcasting status cache updates inspite of that being an LRU cache. We were also not doing it for profilesInChannel cache. Now we fix it by properly checking the invalidationEvent which is something local to the cache itself rather than the cache provider. https://mattermost.atlassian.net/browse/MM-62077 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
69df5df878
Коммит
0f5d160131
@@ -134,7 +134,7 @@ func (ps *PlatformService) InvalidateAllCachesSkipSend() {
|
||||
func (ps *PlatformService) InvalidateAllCaches() *model.AppError {
|
||||
ps.InvalidateAllCachesSkipSend()
|
||||
|
||||
if ps.clusterIFace != nil && *ps.Config().CacheSettings.CacheType == model.CacheTypeLRU {
|
||||
if ps.clusterIFace != nil {
|
||||
msg := &model.ClusterMessage{
|
||||
Event: model.ClusterEventInvalidateAllCaches,
|
||||
SendType: model.ClusterSendReliable,
|
||||
|
||||
@@ -21,7 +21,7 @@ func (ps *PlatformService) AddStatusCacheSkipClusterSend(status *model.Status) {
|
||||
func (ps *PlatformService) AddStatusCache(status *model.Status) {
|
||||
ps.AddStatusCacheSkipClusterSend(status)
|
||||
|
||||
if ps.Cluster() != nil && *ps.Config().CacheSettings.CacheType == model.CacheTypeLRU {
|
||||
if ps.Cluster() != nil {
|
||||
statusJSON, err := json.Marshal(status)
|
||||
if err != nil {
|
||||
ps.logger.Warn("Failed to encode status to JSON", mlog.Err(err))
|
||||
|
||||
Ссылка в новой задаче
Block a user