You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/02/26 04:06:41 UTC

[GitHub] [servicecomb-service-center] little-cui commented on a change in pull request #874: [SCB-2094] Bugfix-cache heartbeat mode in mongo

little-cui commented on a change in pull request #874:
URL: https://github.com/apache/servicecomb-service-center/pull/874#discussion_r583369936



##########
File path: datasource/mongo/mongo.go
##########
@@ -139,7 +141,7 @@ func EnsureInstance() {
 	wrapCreateCollectionError(err)
 
 	instanceIndex := BuildIndexDoc(ColumnRefreshTime)
-	instanceIndex.Options = options.Index().SetExpireAfterSeconds(60)
+	instanceIndex.Options = options.Index().SetExpireAfterSeconds(defaultExpireTime)

Review comment:
       自己实现了心跳,还需要这个索引吗?我建议把之前老的实现删掉,只保留sc自己维护心跳的逻辑

##########
File path: datasource/mongo/heartbeat/cache/heartbeatcache.go
##########
@@ -29,6 +29,11 @@ import (
 	"github.com/apache/servicecomb-service-center/pkg/util"
 )
 
+const (
+	defaultInterval = 60

Review comment:
       interval是30




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org