[jboss-jira] [JBoss JIRA] (JGRP-1982) RequestCorrelator: use IntHashMap / LongHashmap for request correlation
Bela Ban (JIRA)
issues at jboss.org
Fri Dec 25 10:11:00 EST 2015
[ https://issues.jboss.org/browse/JGRP-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144141#comment-13144141 ]
Bela Ban edited comment on JGRP-1982 at 12/25/15 10:10 AM:
-----------------------------------------------------------
Even better: if we keep requests in an array, we don't need to maintain {{REQUEST_ID}} (in {{Request}}), e.g.:
{noformat}
offset=100 | R100 | R101 | R102 | R103 |
{noformat}
The next request would be R104, then R105 etc. The index into the current array plus the offset (which is adjusted on a compaction) give us a unique and monotonically increasing request-id.
Similar to {{Table}}, the array can grow, but it also can be compacted, e.g. by shifting elements in the array to the left (to index 0)...
was (Author: belaban):
Even better: if we keep requests in an array, we don't need to generate request-ids, e.g.:
{noformat}
offset=100 | R100 | R101 | R102 | R103 |
{noformat}
The next request would be R104, then R105 etc. The index into the current array plus the offset (which is adjusted on a compaction) give us a unique and monotonically increasing request-id.
Similar to {{Table}}, the array can grow, but it also can be compacted, e.g. by shifting elements in the array to the left (to index 0)...
> RequestCorrelator: use IntHashMap / LongHashmap for request correlation
> -----------------------------------------------------------------------
>
> Key: JGRP-1982
> URL: https://issues.jboss.org/browse/JGRP-1982
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 3.6.7
>
>
> In RequestCorrelator (and possibly other classes), use an IntHashMap or LongHashmap for the request table. Goal: use less space when we have a lot of requests.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list