You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/06/02 21:37:27 UTC

[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull request #3605: ARTEMIS-3327 removing unecessary blocking operations on update and de…

clebertsuconic commented on a change in pull request #3605:
URL: https://github.com/apache/activemq-artemis/pull/3605#discussion_r644337348



##########
File path: artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
##########
@@ -1075,14 +1067,27 @@ private void internalAppendUpdateRecord(long id,
                                            Persister persister,
                                            Object record,
                                            boolean sync,
+                                           BiConsumer<Long, Boolean> updateCallback,
                                            IOCompletion callback) throws InterruptedException, java.util.concurrent.ExecutionException {
-      final SimpleFuture<Boolean> result = newSyncAndCallbackResult(sync, callback);
       appendExecutor.execute(new Runnable() {
          @Override
          public void run() {
             journalLock.readLock().lock();
             try {
                JournalRecord jrnRecord = records.get(id);
+               if (jrnRecord == null) {
+                  if (compactor == null || (!compactor.containsRecord(id))) {

Review comment:
       the compactor is only changed on writeLock. it is safe to just use the compactor directly here.




-- 
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