jaegertracing/jaeger

[storage] limitations of Cassandra search on LIMIT and complex queries

开放

#166 创建于 2017年5月16日

 (16 条评论) (0 个反应) (0 位负责人)Go (2,326 个派生)batch import
area/storagehelp wanted

仓库指标

星标
 (18,974 个星标)
PR 合并指标
 (平均合并 4天 11小时) (30 天内合并 85 个 PR)

描述

When querying for traces using serviceName, operationName and a tag with the default LIMIT of 20, some results might be omitted.

This is because of this logic which does the following:

  1. Retrieve all traceIDs matching the operation name
  2. Retrieve all traceIDs matching tags
  3. Intersect 1 & 2

Because Cassandra doesn't guarantee ordering, this could eliminate results.

I propose that we do the following instead (or in addition to what we do now),

  1. Retrieve all traceIds matching tags
  2. Filter by operation name

The reason for retrieving traceIds matching tags first targets the use case when somebody is searching for a jaeger-debug-id or some other tag with low cardinality, guaranteeing them a result when it exists.

贡献者指南