[
https://issues.apache.org/jira/browse/HTRACE-115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14338805#comment-14338805
]
stack commented on HTRACE-115:
------------------------------
This change is the formatter I presume? +1
for i := range ops {
On this comment:
"57 // Note that span IDs are unsigned 64-bit numbers.
58 // Begin times, end times, and durations are signed 64-bit numbers.
59 // In order to get LevelDB to properly compare the signed 64-bit
quantities,
60 // we flip the highest bit. This way, we can get leveldb to view
negative
61 // quantities as less than non-negative ones. This also means that we
can do
62 // all queries using unsigned 64-bit math, rather than having to
special-case
63 // the signed fields."
... we do not do math with spanids, right? And we flip the bit only if not
already flipped (The ret ^= 0x8000000000000000 ) ? If so, suggest
adding to comment.
bq. That way we don't have to think about this issue after we apply the
encoding.
An 'encoding' for indices in leveldb seems fine. We are retaining the original
'values' as negatives should they arrive in that way, right? (A negative
duration is recorded as so... just that if it is used as a key, we do
'encoding'/bit-flipping?
Looks good to me Colin +1.
I did grep of 'int64' and loads of places... you had a look to make sure you
have them all?
> The htraced datastore should use uint64 for span ids rather than int64
> ----------------------------------------------------------------------
>
> Key: HTRACE-115
> URL: https://issues.apache.org/jira/browse/HTRACE-115
> Project: HTrace
> Issue Type: Bug
> Affects Versions: 3.2.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HTRACE-115.001.patch
>
>
> Currently we manipulate span IDs as int64 rather than uint64 in some places
> in the htraced datastore. This is wrong since it makes the comparison
> operators work differently than would be expected. We should fix it to use
> uint64.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)