Skip to content

Conversation

liubao68
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 86.408% when pulling 4a9c5cd on liubao68:fallback into ec7a3f9 on ServiceComb:master.

}

@Override
public void record(Invocation invocation, Response response, boolean isSuccess) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the relationship between response.isSuccessed() and the parameter isSuccess?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For bizkeeper, success is based on some specific exceptions than can be customized by developers, e.g. ConnectionException or SocketException. Now if only 499 client exceptions.

http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

<context:component-scan base-package="io.servicecomb.bizkeeper" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<context:component-scan base-package="io.servicecomb" />
we already set this in core.

springmvc:
codeFirst:
fallbackFromCache:
policy: fromcache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change the policy name with the camel case just like fromCache, returnNull, throwException?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I change fromcache to fromCache. But others is compatible.

@ApiResponses(value = {@ApiResponse(code = 200, response = String.class, message = "xxx"),
@ApiResponse(code = 490, response = String.class, message = "xxx")})
public String fallbackReturnNull(@PathVariable(name = "name") String name) {
if ("throwexception".equals(name)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use the constant string.


@Override
public String name() {
return "returnnull";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the camel case "returnNull" and the constant.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 86.504% when pulling 6df98c9 on liubao68:fallback into ec7a3f9 on ServiceComb:master.

@liubao68 liubao68 merged commit d22647d into apache:master Oct 10, 2017
@liubao68 liubao68 deleted the fallback branch January 5, 2018 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants