[ 
https://issues.apache.org/jira/browse/HTRACE-328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15057847#comment-15057847
 ] 

Masatake Iwasaki commented on HTRACE-328:
-----------------------------------------

I was puzzled at first look but the cause seems to be that {{break}} can not be 
used under {{case}} to break out of surrounding {{for}} loop.. The patch looks 
good overall but one nit.

{code}
        case common.GREATER_THAN_OR_EQUALS:
                if bytes.Compare(val, pred.key) >= 0 {
                        return SATISFIED
                } else {
-                       return NOT_SATISFIED
+                       return NOT_YET_SATISFIED
                }
{code}

Is this change needed? Tests passed without this.


> htraced continues scanning in some cases even when no more results are 
> possible
> -------------------------------------------------------------------------------
>
>                 Key: HTRACE-328
>                 URL: https://issues.apache.org/jira/browse/HTRACE-328
>             Project: HTrace
>          Issue Type: Bug
>          Components: htraced
>    Affects Versions: 4.1
>            Reporter: Sean Busbey
>            Assignee: Colin Patrick McCabe
>            Priority: Critical
>         Attachments: HTRACE-328.001.patch
>
>
> htraced continues scanning in some cases even when no more results are 
> possible.
> The clearest example of this is doing a point query on a span id.  It should 
> be just seeking to where the span would be (if it existed) and then either 
> reading it or returning "not found."  Instead, it scans the whole leveldb 
> database.  This can be quite slow on larger leveldb instances.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to