[jboss-jira] [JBoss JIRA] (JGRP-1872) Table: purge() with incorrect seqnos moves HD/LOW back
Bela Ban (JIRA)
issues at jboss.org
Mon Aug 25 11:07:59 EDT 2014
[ https://issues.jboss.org/browse/JGRP-1872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995484#comment-12995484 ]
Bela Ban edited comment on JGRP-1872 at 8/25/14 11:07 AM:
----------------------------------------------------------
Additionla todos:
* Synchronize access to fields, e.g. hd/hr/size: not all methods do this. Examples: {{getMissing()}}, {{size()}} etc.
* Document that {{computeSize()}} and {{computeIndex()}} can never overflow (from int -> long -> negative value), as {{offset}} is set in {{resize()}} or {{comptact()}}.
** Even if we _had_ a negative value, we'd get an {{ArrayIndexOutOfBounds}} exception rather than incorrect state.
was (Author: belaban):
Additionla todos:
* Synchronize access to fields, e.g. hd/hr/size: not all methods do this. Examples: {{getMissing()}}, {{size()}} etc.
* Document that {{computeSize()}} and {{computeIndex()}} can never overflow (from int -> long -> negative value, as {{offset}} is set in {{resize()}} or {{comptact()}}.
> Table: purge() with incorrect seqnos moves HD/LOW back
> ------------------------------------------------------
>
> Key: JGRP-1872
> URL: https://issues.jboss.org/browse/JGRP-1872
> Project: JGroups
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.4.6, 3.5
>
>
> When we have a Table with {{low=40, hd=40, hr=45}} and receive a {{purge(30,true)}}, then the table will be {{low=30,hd=30,hr=45}}.
> This only happens with parameter {{force}} being {{true}}.
> This doesn't cause any bugs, but until the next (correct) {{purge()}} is invoked, the table will show and incorrect number of missing messages.
> SOLUTION: add the check to the start of {{purge()}}:
> {code}
> if(seqno <= low) // perhaps check for force as well
> return;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the jboss-jira
mailing list