wu-sheng commented on a change in pull request #3677: Add register persistent 
worker latency metrics  #3671
URL: https://github.com/apache/skywalking/pull/3677#discussion_r337638729
 
 

 ##########
 File path: 
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/register/worker/RegisterPersistentWorker.java
 ##########
 @@ -80,39 +91,43 @@ private void onWork(RegisterSource registerSource) {
             sources.get(registerSource).combine(registerSource);
         }
 
-        if (sources.size() > 1000 || registerSource.isEndOfBatch()) {
-            sources.values().forEach(source -> {
-                try {
-                    RegisterSource dbSource = registerDAO.get(modelName, 
source.id());
-                    if (Objects.nonNull(dbSource)) {
-                        if (dbSource.combine(source)) {
-                            registerDAO.forceUpdate(modelName, dbSource);
-                        }
-                    } else {
-                        int sequence;
-                        if ((sequence = registerLockDAO.getId(scopeId, 
source)) != Const.NONE) {
-                            try {
-                                dbSource = registerDAO.get(modelName, 
source.id());
-                                if (Objects.nonNull(dbSource)) {
-                                    if (dbSource.combine(source)) {
-                                        registerDAO.forceUpdate(modelName, 
dbSource);
+        try (HistogramMetrics.Timer ignored = histogram.createTimer()) {
 
 Review comment:
   Why timer called ignored?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to