[ 
https://issues.apache.org/jira/browse/SCB-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16467107#comment-16467107
 ] 

ASF GitHub Bot commented on SCB-559:
------------------------------------

asifdxtreme closed pull request #342: SCB-559 Instances count that show in 
Service Center frontend is incorrect
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/342
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server/core/backend/store/defer_instance.go 
b/server/core/backend/store/defer_instance.go
index aa3734e9..177d8aaa 100644
--- a/server/core/backend/store/defer_instance.go
+++ b/server/core/backend/store/defer_instance.go
@@ -80,9 +80,17 @@ func (iedh *InstanceEventDeferHandler) recoverOrDefer(evt 
KvEvent) error {
                }
 
                var instance pb.MicroServiceInstance
+
+               // it will happen in embed mode, and then need to get the cache 
value to unmarshal
+               if kv.Value == nil {
+                       if c, ok := iedh.cache.Data(key).(*mvccpb.KeyValue); ok 
{
+                               kv.Value = c.Value
+                       }
+               }
                err := json.Unmarshal(kv.Value, &instance)
                if err != nil {
-                       util.Logger().Errorf(err, "unmarshal instance file 
failed, key is %s", key)
+                       util.Logger().Errorf(err, "unmarshal instance file 
failed, key is %s, value is %s", key,
+                               util.BytesToStringWithNoCopy(kv.Value))
                        return err
                }
                iedh.items[key] = deferItem{


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Instances count that show in Service Center frontend is incorrect
> -----------------------------------------------------------------
>
>                 Key: SCB-559
>                 URL: https://issues.apache.org/jira/browse/SCB-559
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Service-Center
>    Affects Versions: service-center-1.0.0-m1
>            Reporter: yangyongzheng
>            Assignee: little-cui
>            Priority: Major
>             Fix For: service-center-1.0.0-m2
>
>
> Instances count that show in Service Center frontend does a decrease after 
> abount 80 second since "[INFO] Unregister microservice instance success. " 
> had printed in java chassis,not immediately



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to