-
Notifications
You must be signed in to change notification settings - Fork 829
JAV-429 Modify the startup policy of SDK #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| /** | ||
| *Created by on 2017/11/22. | ||
| */ | ||
| public class Sha { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems guava already has this utils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,use guava is better
| } | ||
|
|
||
| @Override | ||
| public ServiceCenter getServiceCenter() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left these methods empty not good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,i'll use some information to mark
| } | ||
|
|
||
| @Override | ||
| public boolean syncSchemasAll(Microservice microservice) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there are 600 schemas, will this request too big?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so how to deal with such a scene? if local schema is not same with SC's
| if (Const.SERVICECENTER_RUNMODE_DEV.equals(srClient.getServiceCenter().getRunMode())) { | ||
| LOGGER.warn("The current servicecenter environment runmode is {}", Const.SERVICECENTER_RUNMODE_DEV); | ||
| return true; | ||
| } else if (Const.SERVICECENTER_RUNMODE_PROD.equals(srClient.getServiceCenter().getRunMode())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already return, no need else
| return true; | ||
| } | ||
|
|
||
| private boolean serviceCenterEnv() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serviceCenterEnv is not clear
it seems that to determine if it is dev mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use String instead of boolean to do the return value type, and then judge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only in the dev can perform changes currently, so determine if it is dev mode in the method,we can only care about it'll return true or false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
but method name is serviceCenterEnv, not relative to dev mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,i've changed the metnod's name to serviceCenterEnvIsDev
| * | ||
| * 同步本地schema | ||
| */ | ||
| boolean syncSchemasAll(Microservice microservice); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a batch api to determine if some schemas exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this time i use the batch upload interface that SC provided,if not good enough, we can use the better plan
|
Changes Unknown when pulling cb2941a on wWX495170:master into ** on ServiceComb:master**. |
|
@wWX495170 Can you rebase the change to resolve the conflicts? |
weichao666
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JAV-429 Modify the startup policy of SDK
weichao666
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JAV-429 Modify the startup policy of SDK
JAV-429 Modify the startup policy of SDK
added schema summary,
added batch registration,
added to determine whether the servicecenter environment's runmode is dev,