[
https://issues.apache.org/jira/browse/CASSANDRA-2858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464190#comment-13464190
]
Jonathan Ellis commented on CASSANDRA-2858:
-------------------------------------------
The rebuilding logic in v3 turns out to rely on the sign bit of the int being
1, so that when it gets and-ed with the long, it gets sign-extended:
{code}
. Long foo = 0xFFFFFFFFFFFFFFFFL;
int bar = 0xF0000000;
System.out.println(Long.toHexString(foo & bar));
System.out.println(Long.toHexString(foo & 0));
{code}
This outputs
{noformat}
fffffffff0000000
0
{noformat}
Thus, when the high order bit of the lower 32 bits of currentTimeMillis is
instead zero, then the and zeros out the entire high 32 of the long we were
trying to rebuild with.
pushed my suggested alternative above in
822ee88a38b3862d60b50748382ddf7957907cec, which does not rely on sign extension.
> make request dropping more accurate
> -----------------------------------
>
> Key: CASSANDRA-2858
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2858
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Ryan King
> Assignee: Jonathan Ellis
> Priority: Minor
> Fix For: 1.2.0 beta 1
>
> Attachments: 2858.txt, 2858-v2.txt, 2858-v3.txt
>
>
> Based on the discussion in CASSANDRA-2819, we can make the bookkeeping for
> request times more accurate.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira