[Feature-6471]Cache Process definition in master#6485
[Feature-6471]Cache Process definition in master#6485zhuangchong merged 16 commits intoapache:devfrom
Conversation
zhongjiajie
left a comment
There was a problem hiding this comment.
Add some of minor suggestion
zhongjiajie
left a comment
There was a problem hiding this comment.
Seem not CI failed, but we have typo in our database filed
Co-authored-by: Jiajie Zhong <zhongjiajie955@hotmail.com>
Codecov Report
@@ Coverage Diff @@
## dev #6485 +/- ##
============================================
+ Coverage 38.62% 38.64% +0.02%
- Complexity 3206 3211 +5
============================================
Files 645 645
Lines 25735 25757 +22
Branches 2788 2792 +4
============================================
+ Hits 9940 9955 +15
- Misses 14881 14890 +9
+ Partials 914 912 -2
Continue to review full report at Codecov.
|
| #master.task.commit.interval=1000 | ||
|
|
||
| # master cache process definition | ||
| #master.cache.process.definition=true |
There was a problem hiding this comment.
Should we turn on cache by default
| #master.cache.process.definition=true | |
| master.cache.process.definition=true |
There was a problem hiding this comment.
we have already set the default value in the class MasterConfig.
There was a problem hiding this comment.
For this situation, I think we better add comment in L42 to desc # master cache process definition, default true make it more clearer
There was a problem hiding this comment.
you are right.
thank you for your suggestion.
| this.masterConfig.getMasterExecThreads() - activeCount, command); | ||
| command, | ||
| processDefinitionCacheMaps); | ||
| if (!masterConfig.getMasterCacheProcessDefinition() |
There was a problem hiding this comment.
Is it better to manage processDefinition cache by a unified manager?
| Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam()); | ||
|
|
||
| ProcessDefinition processDefinition = getProcessDefinitionByCommand(command.getProcessDefinitionCode(), cmdParam); | ||
| String key = String.format("%d-%d", command.getProcessDefinitionCode(), command.getProcessDefinitionVersion()); |
There was a problem hiding this comment.
Any other else? Or it just use for constructProcessInstance?
There was a problem hiding this comment.
- Is it better to manage processDefinition cache by a unified manager?
yes, you are right, we can use a unified cache manager. we need to optimize this caching method next.
There was a problem hiding this comment.
Any other else? Or it just use for constructProcessInstance?
maybe the task definitions can also be cached
and a clean-up mechanism can also be added to the cache queue, eg: clean cache queue once a day?
|
Kudos, SonarCloud Quality Gate passed! |
* feature-6471 Cache Process definition in master








close #6471 cache process definition in master