[ISSUE-#4467] Fix snowflake id problem (#4468)
* fix snowflake id problem * revert code format
This commit is contained in:
parent
ec99590500
commit
2546f052e4
@ -810,8 +810,13 @@ public class ServiceManager implements RecordListener<Service> {
|
||||
|
||||
if (UtilsAndCommons.UPDATE_INSTANCE_ACTION_REMOVE.equals(action)) {
|
||||
instanceMap.remove(instance.getDatumKey());
|
||||
} else {
|
||||
Instance oldInstance = instanceMap.get(instance.getDatumKey());
|
||||
if (oldInstance != null) {
|
||||
instance.setInstanceId(oldInstance.getInstanceId());
|
||||
} else {
|
||||
instance.setInstanceId(instance.generateInstanceId(currentInstanceIds));
|
||||
}
|
||||
instanceMap.put(instance.getDatumKey(), instance);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user