Skip to content

Commit 9f10f58

Browse files
authoredFeb 6, 2023
Merge pull request #80 from wuzuoliang/len(oldValue.Different(newValue))==0
Update agollo.go
2 parents 7741370 + 9d726ca commit 9f10f58

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎agollo.go

+7
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,13 @@ func (a *agollo) longPoll() {
380380
if status == http.StatusNotModified {
381381
continue
382382
}
383+
384+
if len(oldValue.Different(newValue)) == 0 {
385+
// case 可能是apollo集群搭建问题
386+
// GetConfigsFromNonCache 返回了了一模一样的数据,但是http.status code == 200
387+
// 导致NotificationID更新了,但是真实的配置没有更新,而后续也不会获取到新配置,除非有新的变更触发
388+
continue
389+
}
383390

384391
// 发送到监听channel
385392
a.sendWatchCh(notification.NamespaceName, oldValue, newValue)

0 commit comments

Comments
 (0)