Merge pull request #1919 from satjd/bugfix-#1916
[ISSUE #1916] Fix returning ErrCode:400 when register instances concurrently to non-existent services
This commit is contained in:
commit
45ca16f5fb
@ -445,9 +445,9 @@ public class ServiceManager implements RecordListener<Service> {
|
||||
service.getClusterMap().put(cluster.getName(), cluster);
|
||||
}
|
||||
service.validate();
|
||||
if (local) {
|
||||
putServiceAndInit(service);
|
||||
} else {
|
||||
|
||||
putServiceAndInit(service);
|
||||
if (!local) {
|
||||
addOrReplaceService(service);
|
||||
}
|
||||
}
|
||||
@ -470,9 +470,9 @@ public class ServiceManager implements RecordListener<Service> {
|
||||
service.getClusterMap().put(cluster.getName(), cluster);
|
||||
}
|
||||
service.validate();
|
||||
if (local) {
|
||||
putServiceAndInit(service);
|
||||
} else {
|
||||
|
||||
putServiceAndInit(service);
|
||||
if (!local) {
|
||||
addOrReplaceService(service);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user