You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/08/13 17:20:00 UTC

[jira] [Commented] (ARTEMIS-5376) Include all messages in queue management operations

    [ https://issues.apache.org/jira/browse/ARTEMIS-5376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18104584#comment-18104584 ] 

ASF subversion and git services commented on ARTEMIS-5376:
----------------------------------------------------------

Commit 00dd2dde19f974bf1ee555881f132f995045b95a in artemis's branch refs/heads/main from Shivan Taher
[ https://gitbox.apache.org/repos/asf?p=artemis.git;h=00dd2dde19 ]

ARTEMIS-6179 Fix deleteReference/depage deadlock

Removes synchronized from QueueImpl#deleteReference(). It calls
iterQueue(), which acquires depageLock internally, while depage()
acquires depageLock first and then enters a synchronized(this)
block. The reversed lock order deadlocks QueueControl#removeMessage()
against the paging executor whenever they race on an actively
paging queue.

This mirrors the fix already applied to copyReference() in
ARTEMIS-5376: iterQueue() already provides its own synchronization
via depageLock, so the outer synchronized on deleteReference() is
redundant and unsafe. Verified with
testRemoveMessageWhilstPagingAndConsuming, which reliably deadlocks
without this change and passes cleanly with it.


> Include all messages in queue management operations
> ---------------------------------------------------
>
>                 Key: ARTEMIS-5376
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5376
>             Project: Artemis
>          Issue Type: Improvement
>            Reporter: Anton Roskvist
>            Assignee: Anton Roskvist
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.53.0
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Currently, some queue management operations act on all messages (including paged and scheduled messages) and some don't. Some operations use their own iterator logic (internally) and some use a common method.
> This change aims to improve this by adding some functionality into the 'QueueIterateAction' class and then have additional management operations use it (so that their behavior is consistent with regards to what messages they target and how)
> As of now I have left expire and delete reference/references out as I wasn't 100% sure it wont have any adverse effects. If desired, they should be trivial to add as well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org