[jboss-jira] [JBoss JIRA] Commented: (JGRP-1132) AckReceiverWindow: make non blocking

Bela Ban (JIRA) jira-events at lists.jboss.org
Tue Mar 2 04:10:11 EST 2010


    [ https://jira.jboss.org/jira/browse/JGRP-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12517480#action_12517480 ] 

Bela Ban commented on JGRP-1132:
--------------------------------

Chosen solution:
- The lookup ConcurrentHashMap has Segments and maps seqnos to segments
- A segment has an AtomicReferenceArray<Message>, and maps a seqno to an index
- A Message at a given index can be null, non-null or a TOMBSTONE
- Segment.add() and Segment.remove() are atomic and set an element from null --> valid message (add()), or valid message --> TOMBSTONE (remove())
- The initial lookup in the CHM still uses per-bucket locks, but most of the time these are gets: new segments are infrequently created (depends on the segment size) and old segments are infrequently removed, too
- To even eliminate the lookup CHM, there are 2 pointers: one to the current segment to add a new message and one to the current segment from
  which to remove a message. This bypasses a CHM lookup in almost all cases and makes the ARW almost completely look-free !

> AckReceiverWindow: make non blocking
> ------------------------------------
>
>                 Key: JGRP-1132
>                 URL: https://jira.jboss.org/jira/browse/JGRP-1132
>             Project: JGroups
>          Issue Type: Task
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>            Priority: Minor
>             Fix For: 2.10
>
>         Attachments: AckReceiverWindow.java, bla.java
>
>
> Remove the lock acquired by AckReceiverWindow on adds and removes. Use a ConcurrentHashMap to make these operations non-blocking (well, besides the write lock on a CHM segment).
> This should yield better perf

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list