You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/07/04 09:03:10 UTC
[GitHub] [skywalking] dmsolr commented on a change in pull request #3004:
Improve RegisterPersistentWorker by bulk persistence to reduce cluster
blocking
dmsolr commented on a change in pull request #3004: Improve RegisterPersistentWorker by bulk persistence to reduce cluster blocking
URL: https://github.com/apache/skywalking/pull/3004#discussion_r300301636
##########
File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/register/worker/RegisterPersistentWorker.java
##########
@@ -80,43 +92,80 @@ private void onWork(RegisterSource registerSource) {
} else {
sources.get(registerSource).combine(registerSource);
}
-
if (sources.size() > 1000 || registerSource.getEndOfBatchContext().isEndOfBatch()) {
sources.values().forEach(source -> {
+ RegisterSource cacheSource = null;
try {
- RegisterSource dbSource = registerDAO.get(modelName, source.id());
+ RegisterSource dbSource = this.getRegisterSourceCache(source.id());
if (Objects.nonNull(dbSource)) {
if (dbSource.combine(source)) {
- registerDAO.forceUpdate(modelName, dbSource);
Review comment:
forceUpdate means update immediately. I am not sure that it can be change to batch. Because the data will be delay to visible to others.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services