You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/12/23 10:21:00 UTC
[jira] [Work logged] (ARTEMIS-3620) Journal blocking delete/update record with no sync
[ https://issues.apache.org/jira/browse/ARTEMIS-3620?focusedWorklogId=700484&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-700484 ]
ASF GitHub Bot logged work on ARTEMIS-3620:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 23/Dec/21 10:20
Start Date: 23/Dec/21 10:20
Worklog Time Spent: 10m
Work Description: franz1981 commented on pull request #3889:
URL: https://github.com/apache/activemq-artemis/pull/3889#issuecomment-1000196035
Some results of this change.
Pre:
```
Benchmark (compactMinFiles) (compactPercentage) (fileSize) (minFiles) (poolSize) (recordSize) (records) Mode Cnt Score Error Units
JournalSyncDeletePerfTest.batchAppendUpdateDelete 10 30 10485760 4 20 64 100 avgt 20 1476.175 ± 26.177 us/op
JournalSyncDeletePerfTest.batchAppendUpdateDelete 10 30 10485760 4 20 64 1000 avgt 20 14994.321 ± 590.080 us/op
```
Post:
```
Benchmark (compactMinFiles) (compactPercentage) (fileSize) (minFiles) (poolSize) (recordSize) (records) Mode Cnt Score Error Units
JournalSyncDeletePerfTest.batchAppendDelete 10 30 10485760 4 20 64 100 avgt 20 489.463 ± 28.756 us/op
JournalSyncDeletePerfTest.batchAppendDelete 10 30 10485760 4 20 64 1000 avgt 20 4476.861 ± 139.642 us/op
```
--
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.
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Issue Time Tracking
-------------------
Worklog Id: (was: 700484)
Time Spent: 0.5h (was: 20m)
> Journal blocking delete/update record with no sync
> ---------------------------------------------------
>
> Key: ARTEMIS-3620
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3620
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> https://github.com/apache/activemq-artemis/pull/3605, part of ARTEMIS-3327, has introduced a blocking logic while checking for record's presence on both delete and update operations, regardless the configured {{sync}} parameter.
> Before the mentioned change, the journal was using {{checkKnownRecordID}} to check for record presence that can save blocking in the happy (and most common) path:
> {code:java}
> private boolean checkKnownRecordID(final long id, boolean strict) throws Exception {
> if (records.containsKey(id) || pendingRecords.contains(id) || (compactor != null && compactor.containsRecord(id))) {
> return true;
> }
> final SimpleFuture<Boolean> known = new SimpleFutureImpl<>();
> // retry on the append thread. maybe the appender thread is not keeping up.
> appendExecutor.execute(new Runnable() {
> @Override
> public void run() {
> journalLock.readLock().lock();
> try {
> known.set(records.containsKey(id)
> || pendingRecords.contains(id)
> || (compactor != null && compactor.containsRecord(id)));
> } finally {
> journalLock.readLock().unlock();
> }
> }
> });
> if (!known.get()) {
> if (strict) {
> throw new IllegalStateException("Cannot find add info " + id + " on compactor or current records");
> }
> return false;
> } else {
> return true;
> }
> }
> {code}
> There are 3 solutions to this issue:
> # reintroduce {{checkKnownRecordID}} and save blocking in the common & happy path
> # introduce a smaller semantic change that don't report any error with no sync and no callback specified
> # introduce a bigger semantic change that don't report any error due to missing record ID to delete/update
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)