You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/01/31 11:06:11 UTC

[GitHub] [dubbo-go] luckyxiaoqiang opened a new pull request #1030: Improve config center

luckyxiaoqiang opened a new pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030


   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/contributing.md before commit pull request. 
   -->
   
   **What this PR does**:
   - Fix update of external config map
   - AppExternalConfiguration orders before ExternalConfiguration
   - Add config cache file
   - Fix some typos
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #729 
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] luckyxiaoqiang commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r583305328



##########
File path: config/config_loader.go
##########
@@ -138,6 +140,17 @@ func loadConsumerConfig() {
 		ref.Implement(rpcService)
 	}
 
+	// Write current configuration to cache file.
+	if consumerConfig.CacheFile != "" {
+		if data, err := yaml.MarshalYML(consumerConfig); err != nil {
+			logger.Errorf("Marshal consumer config err: %s", err.Error())
+		} else {
+			if err := ioutil.WriteFile(consumerConfig.CacheFile, data, 0666); err != nil {

Review comment:
       Please see the issue comment: https://github.com/apache/dubbo-go/issues/729#issuecomment-681617545.




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] luckyxiaoqiang commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r593835294



##########
File path: config/base_config.go
##########
@@ -50,6 +50,9 @@ type BaseConfig struct {
 	EventDispatcherType string        `default:"direct" yaml:"event_dispatcher_type" json:"event_dispatcher_type,omitempty"`
 	MetricConfig        *MetricConfig `yaml:"metrics" json:"metrics,omitempty"`
 	fileStream          *bytes.Buffer
+
+	// cache file used to store the current used configurations.
+	CacheFile string `yaml:"cache_file" json:"cache_file,omitempty" property:"cache_file"`

Review comment:
       Please see `config_loader.go` file.




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] luckyxiaoqiang commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r583305968



##########
File path: common/config/environment.go
##########
@@ -72,22 +72,34 @@ func (env *Environment) UpdateExternalConfigMap(externalMap map[string]string) {
 	for k, v := range externalMap {
 		env.externalConfigMap.Store(k, v)
 	}
+	env.externalConfigMap.Range(func(key, value interface{}) bool {
+		if _, ok := externalMap[key.(string)]; !ok {
+			env.externalConfigMap.Delete(key)

Review comment:
       It will be executed when a key of external config deleted.




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] luckyxiaoqiang commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r583306641



##########
File path: common/config/environment.go
##########
@@ -72,22 +72,34 @@ func (env *Environment) UpdateExternalConfigMap(externalMap map[string]string) {
 	for k, v := range externalMap {
 		env.externalConfigMap.Store(k, v)
 	}
+	env.externalConfigMap.Range(func(key, value interface{}) bool {
+		if _, ok := externalMap[key.(string)]; !ok {
+			env.externalConfigMap.Delete(key)

Review comment:
       Units tests already covered, please see the change of test file.




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] LaurenceLiZhixin commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r593896295



##########
File path: config/base_config.go
##########
@@ -50,6 +50,9 @@ type BaseConfig struct {
 	EventDispatcherType string        `default:"direct" yaml:"event_dispatcher_type" json:"event_dispatcher_type,omitempty"`
 	MetricConfig        *MetricConfig `yaml:"metrics" json:"metrics,omitempty"`
 	fileStream          *bytes.Buffer
+
+	// cache file used to store the current used configurations.
+	CacheFile string `yaml:"cache_file" json:"cache_file,omitempty" property:"cache_file"`

Review comment:
       Yes, you write provider config to CacheFile, but I want to know where to use it. 




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] luckyxiaoqiang commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r593902066



##########
File path: config/base_config.go
##########
@@ -50,6 +50,9 @@ type BaseConfig struct {
 	EventDispatcherType string        `default:"direct" yaml:"event_dispatcher_type" json:"event_dispatcher_type,omitempty"`
 	MetricConfig        *MetricConfig `yaml:"metrics" json:"metrics,omitempty"`
 	fileStream          *bytes.Buffer
+
+	// cache file used to store the current used configurations.
+	CacheFile string `yaml:"cache_file" json:"cache_file,omitempty" property:"cache_file"`

Review comment:
       Please see the issue comment: #729 (comment).




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zouyx commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r579618188



##########
File path: config/config_loader.go
##########
@@ -138,6 +140,17 @@ func loadConsumerConfig() {
 		ref.Implement(rpcService)
 	}
 
+	// Write current configuration to cache file.
+	if consumerConfig.CacheFile != "" {
+		if data, err := yaml.MarshalYML(consumerConfig); err != nil {
+			logger.Errorf("Marshal consumer config err: %s", err.Error())
+		} else {
+			if err := ioutil.WriteFile(consumerConfig.CacheFile, data, 0666); err != nil {

Review comment:
       I can not get this point. why will you copy this config to a new file?




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] flycash commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
flycash commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r567779148



##########
File path: common/config/environment.go
##########
@@ -72,22 +72,34 @@ func (env *Environment) UpdateExternalConfigMap(externalMap map[string]string) {
 	for k, v := range externalMap {
 		env.externalConfigMap.Store(k, v)
 	}
+	env.externalConfigMap.Range(func(key, value interface{}) bool {
+		if _, ok := externalMap[key.(string)]; !ok {
+			env.externalConfigMap.Delete(key)

Review comment:
       In which case this code will be excuted? 
   
   It looks like that the unit tests do not cover this special case.

##########
File path: common/config/environment.go
##########
@@ -72,22 +72,34 @@ func (env *Environment) UpdateExternalConfigMap(externalMap map[string]string) {
 	for k, v := range externalMap {
 		env.externalConfigMap.Store(k, v)
 	}
+	env.externalConfigMap.Range(func(key, value interface{}) bool {
+		if _, ok := externalMap[key.(string)]; !ok {
+			env.externalConfigMap.Delete(key)
+		}
+		return true
+	})
 }
 
 // UpdateAppExternalConfigMap updates env appExternalConfigMap field
 func (env *Environment) UpdateAppExternalConfigMap(externalMap map[string]string) {
 	for k, v := range externalMap {
 		env.appExternalConfigMap.Store(k, v)
 	}
+	env.appExternalConfigMap.Range(func(key, value interface{}) bool {
+		if _, ok := externalMap[key.(string)]; !ok {
+			env.appExternalConfigMap.Delete(key)
+		}
+		return true
+	})

Review comment:
       I think those lines could be refactor and extract them to be a new function

##########
File path: config/config_loader.go
##########
@@ -194,6 +207,17 @@ func loadProviderConfig() {
 	}
 	checkRegistries(providerConfig.Registries, providerConfig.Registry)
 
+	// Write the current configuration to cache file.
+	if providerConfig.CacheFile != "" {
+		if data, err := yaml.MarshalYML(providerConfig); err != nil {
+			logger.Errorf("Marshal provider config err: %s", err.Error())
+		} else {
+			if err := ioutil.WriteFile(providerConfig.CacheFile, data, 0666); err != nil {
+				logger.Errorf("Write provider config cache file err: %s", err.Error())
+			}
+		}
+	}

Review comment:
       See my above comment

##########
File path: config/config_loader.go
##########
@@ -138,6 +140,17 @@ func loadConsumerConfig() {
 		ref.Implement(rpcService)
 	}
 
+	// Write current configuration to cache file.
+	if consumerConfig.CacheFile != "" {
+		if data, err := yaml.MarshalYML(consumerConfig); err != nil {
+			logger.Errorf("Marshal consumer config err: %s", err.Error())
+		} else {
+			if err := ioutil.WriteFile(consumerConfig.CacheFile, data, 0666); err != nil {
+				logger.Errorf("Write consumer config cache file err: %s", err.Error())
+			}
+		}
+	}

Review comment:
       I am not sure whether we should do this like:
   ```go
   (c *consumerConfig) SaveToCacheFile() {
       // ...
   }
   
   // in this funtion
   
   consumerConfig.SaveToFile()
   ```




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] LaurenceLiZhixin commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r592017698



##########
File path: config/base_config.go
##########
@@ -50,6 +50,9 @@ type BaseConfig struct {
 	EventDispatcherType string        `default:"direct" yaml:"event_dispatcher_type" json:"event_dispatcher_type,omitempty"`
 	MetricConfig        *MetricConfig `yaml:"metrics" json:"metrics,omitempty"`
 	fileStream          *bytes.Buffer
+
+	// cache file used to store the current used configurations.
+	CacheFile string `yaml:"cache_file" json:"cache_file,omitempty" property:"cache_file"`

Review comment:
       I can't find where to use this field.




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks merged pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030


   


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io commented on pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#issuecomment-770725768


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1030?src=pr&el=h1) Report
   > Merging [#1030](https://codecov.io/gh/apache/dubbo-go/pull/1030?src=pr&el=desc) (2eaecfd) into [1.5](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc) (968650f) will **increase** coverage by `0.11%`.
   > The diff coverage is `54.10%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/1030/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/1030?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##              1.5    #1030      +/-   ##
   ==========================================
   + Coverage   59.53%   59.65%   +0.11%     
   ==========================================
     Files         259      261       +2     
     Lines       12737    12943     +206     
   ==========================================
   + Hits         7583     7721     +138     
   - Misses       4199     4248      +49     
   - Partials      955      974      +19     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1030?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/base\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYmFzZV9jbHVzdGVyX2ludm9rZXIuZ28=) | `61.11% <0.00%> (-5.56%)` | :arrow_down: |
   | [cluster/router/condition/listenable\_router.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvY29uZGl0aW9uL2xpc3RlbmFibGVfcm91dGVyLmdv) | `54.71% <0.00%> (ø)` | |
   | [cluster/router/healthcheck/health\_check\_route.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvaGVhbHRoY2hlY2svaGVhbHRoX2NoZWNrX3JvdXRlLmdv) | `70.37% <0.00%> (ø)` | |
   | [cluster/router/tag/router\_rule.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL3JvdXRlcl9ydWxlLmdv) | `89.47% <ø> (+12.20%)` | :arrow_up: |
   | [cluster/router/tag/tag\_router.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL3RhZ19yb3V0ZXIuZ28=) | `72.59% <0.00%> (ø)` | |
   | [common/extension/config\_post\_processor.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfcG9zdF9wcm9jZXNzb3IuZ28=) | `0.00% <0.00%> (ø)` | |
   | [common/proxy/proxy.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y29tbW9uL3Byb3h5L3Byb3h5Lmdv) | `90.19% <0.00%> (+0.87%)` | :arrow_up: |
   | [common/proxy/proxy\_factory/default.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y29tbW9uL3Byb3h5L3Byb3h5X2ZhY3RvcnkvZGVmYXVsdC5nbw==) | `13.55% <0.00%> (+0.22%)` | :arrow_up: |
   | [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.02% <ø> (ø)` | |
   | ... and [150 more](https://codecov.io/gh/apache/dubbo-go/pull/1030/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1030?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1030?src=pr&el=footer). Last update [96a2c92...e703ce9](https://codecov.io/gh/apache/dubbo-go/pull/1030?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#issuecomment-770713739


   pls change the target branch to 1.5


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] luckyxiaoqiang commented on pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#issuecomment-770743017


   > pls change the target branch to 1.5
   
   Updated.


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] LaurenceLiZhixin commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r592015679



##########
File path: common/config/environment.go
##########
@@ -72,22 +72,34 @@ func (env *Environment) UpdateExternalConfigMap(externalMap map[string]string) {
 	for k, v := range externalMap {
 		env.externalConfigMap.Store(k, v)
 	}
+	env.externalConfigMap.Range(func(key, value interface{}) bool {
+		if _, ok := externalMap[key.(string)]; !ok {
+			env.externalConfigMap.Delete(key)

Review comment:
       Why not clear old map and copy from externalMap once.




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] luckyxiaoqiang commented on a change in pull request #1030: Improve config center

Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on a change in pull request #1030:
URL: https://github.com/apache/dubbo-go/pull/1030#discussion_r593902066



##########
File path: config/base_config.go
##########
@@ -50,6 +50,9 @@ type BaseConfig struct {
 	EventDispatcherType string        `default:"direct" yaml:"event_dispatcher_type" json:"event_dispatcher_type,omitempty"`
 	MetricConfig        *MetricConfig `yaml:"metrics" json:"metrics,omitempty"`
 	fileStream          *bytes.Buffer
+
+	// cache file used to store the current used configurations.
+	CacheFile string `yaml:"cache_file" json:"cache_file,omitempty" property:"cache_file"`

Review comment:
       Please see the issue comment: https://github.com/apache/dubbo-go/issues/729#issuecomment-681617545.




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org