You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/05/30 19:16:00 UTC
[jira] [Commented] (ARIES-2230) Race condition in TopologyManagerImpor handling of endpoint events
[ https://issues.apache.org/jira/browse/ARIES-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18084606#comment-18084606 ]
ASF subversion and git services commented on ARIES-2230:
--------------------------------------------------------
Commit d3fc2043068fad94b2c2f9dbb14ab2ead9481eca in aries-rsa's branch refs/heads/master from Amichai Rothman
[ https://gitbox.apache.org/repos/asf?p=aries-rsa.git;h=d3fc2043 ]
ARIES-2230 Fix Race condition in TopologyManagerImpor handling of endpoint events
> Race condition in TopologyManagerImpor handling of endpoint events
> ------------------------------------------------------------------
>
> Key: ARIES-2230
> URL: https://issues.apache.org/jira/browse/ARIES-2230
> Project: Aries
> Issue Type: Task
> Components: Remote Service Admin
> Affects Versions: rsa-1.16.1
> Reporter: Amichai Rothman
> Priority: Major
>
> For every endpoint changed event, TopologyManagerImport updates the possibilities and schedules a run of synchronizeImports on a separate threads. The thread processes the updated snapshot at the moment of processing (and not at the moment the event was triggered), which is correct - it processes updated data and not stale data.
> However, two such threads running concurrently still create a race condition, e.g. an added endpoint is checked by both to not exist, so both try to import it and we get a duplicate import. We should synchronize the process so there is only one execution running at a time. The waiting thread will start when the current one finishes, and will either process additional updates or will be a no-op if nothing changed.
> In addition, when receiving a RemoteServiceAdminEvent.IMPORT_UNREGISTRATION event, it calls unimportRegistration directly which removes the import potentially concurrently with synchronizeImports, so we should make sure there is no race condition there as well.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)