Skip to content

Conversation

wujimin
Copy link
Contributor

@wujimin wujimin commented Nov 16, 2017

edge service do not dispatch microservice invocation to the old instance that do not support the new operation

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 86.829% when pulling afee43b on wujimin:operation-filter into b0cc025 on ServiceComb:master.


<bean id="cse.executor.default" class="io.servicecomb.core.executor.FixedThreadExecutor"></bean>
<bean id="cse.executor.groupThreadPool" class="io.servicecomb.core.executor.FixedThreadExecutor"></bean>
<alias name="cse.executor.groupThreadPool" alias="cse.executor.default"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

indention

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

String microserviceName = pathParams.get("param0");
String path = "/" + pathParams.get("param1");
String pathVersion = pathParams.get("param1");
String path = context.request().path().substring(4);
Copy link
Member

Choose a reason for hiding this comment

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

How can we tell the path by removing the first 4 characters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a demo
and the path rule is :/api/ms/version/......

invoke("/v2/dec", 2, 1, decV2Result);
invoke("/v2/dec", 3, 1, decV2Result);

printResults("v1/add", addV1Result);
Copy link
Member

Choose a reason for hiding this comment

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

We should use assert instead of printResults to check the result data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

if (DynamicPropertyFactory.getInstance()
.getStringProperty(ExecutorManager.KEY_EXECUTORS_DEFAULT, null)
.get() != null) {
return;
Copy link
Member

Choose a reason for hiding this comment

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

we may need to do some log here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

return;
}

// change default to reactive mode
Copy link
Member

Choose a reason for hiding this comment

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

log the edge service works in reactive mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 86.872% when pulling 4b98f73 on wujimin:operation-filter into 410ef32 on ServiceComb:master.

@WillemJiang WillemJiang merged commit 6c2f9a7 into apache:master Nov 17, 2017
@wujimin wujimin deleted the operation-filter branch January 1, 2018 09:02
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