Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort order not respected for result limiting #182

Closed
ringerc opened this issue Feb 6, 2018 · 1 comment
Closed

Sort order not respected for result limiting #182

ringerc opened this issue Feb 6, 2018 · 1 comment

Comments

@ringerc
Copy link

ringerc commented Feb 6, 2018

The trace search limit is applied before the sort order modifier when looking up traces, at least for the all-in-one container build. This results in a random and unpredictable set of traces

If you have (say) 1000 traces and want the 10 most recent, you'd expect searching with "most recent first" and a limit of 10 to find them. But in fact, you will get some arbitrary set of those 1000 traces, and that arbitrary selection will then be sorted in order of most to least recent.

In SQL DB terms, this is incorrectly applying the LIMIT before the ORDER BY.

Unclear if this affects other backends yet. Looking to see if there are canned Cassandra or ElasticSearch backends I can play with to validate.

@tiffon
Copy link
Member

tiffon commented Feb 6, 2018

I see - the memstore implementation likely doesn't provide stable search, because it uses hash maps internally. It's doable, but doesn't seem too important.

#57 (comment)

Closing as a dupe.

@tiffon tiffon closed this as completed Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants