Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Done
-
None
-
None
Description
currently, we have so many config item need to read by priority.
1.read operation level
2.if operation level not exist, then read schema level
3.if schema level not exist, then read microservice level
4.if microservice level not exist, then read global level (only for consumer)
everyone repeated the logic, and try all the level for every invocation
we can provide a mechanism to handle this logic, eg:
class XxxConfig{ @Config(prefix="servicecomb.request.time") private int timeout; ...... } OperationMeta.extData changed from ConcurrentHashMap to ConcurrentHashMapEx XxxConfig config = operationMeta.getExtData().computeIfAbsent("...", k->ConfigFactory.create(operationMeta)); config.getTimeout() // this is what we want. all try logic is triggered by config change callback, not run for every invocation.
Attachments
Attachments
Issue Links
- links to