ChronixDB / chronix.server

The Chronix Server implementation that is based on Apache Solr.
Apache License 2.0
263 stars 29 forks source link

missing some aggregations returned by cf #153

Closed Rishi0405 closed 4 years ago

Rishi0405 commented 4 years ago

Hi, I am facing the following issue, that sometimes I am not getting all aggregation results that I have sent in cf

query {q=start:2019-10-14T21:00:00.000Z AND end:2019-10-15T21:00:00.000Z AND mdefId:(00024 10020) AND sVertexId:(26624 1632000 137984 1633792 272384 1633536 1628416 1630208 1684736 1700608), cf=metric{avg;max}, fl=-data,-gUpdatedTs, cj=name}

A total of 900 records found but some with missing aggregation eg:

[
    {
        "join_key":"...",
        "sVertexId":["26624"],
        "mdefId":["10020"],
        "start":1571124699940,
        "end":1571156694940,
        "0_function_max":0.18070587318441741,
        "1_function_avg":0.12480652753507317
    },
    {
        "join_key":"...",
        "sVertexId":["137984"],
        "mdefId":["00024"],
        "start":1571124684940,
        "end":1571156694940,
        "0_function_max":0.0
        **(missing avg)**
    },
    {
        "join_key":"...",
        "sVertexId":["26624"],
        "mdefId":["00024"],
        "start":1571124684940,
        "end":1571156694940,
        "1_function_avg":0.0
        **(missing max)**
    }
]

This is not happening all the time but what would be the reason that avg or max be missing sometime.

Chronix version: chronix-solr-8.1.1

Thanks, Rishi

FlorianLautenschlager commented 4 years ago

Hi Rishi, thanks for reporting. I am currently on vacation without any laptop computer. What would be great, if you can send me a reproducer. I will dig into it next week.

Best regards Florian

Sent with GitHawk

Rishi0405 commented 4 years ago

Hi Florian,

I have tested with the below dataset

{ type: 'metric', name: 'testMetrics', start: 1571633880000, end: 1571635080000, data: 'H4sIAAAAAAAAAOPi1Dx7BgRq7Ll4FR4sF9JkgAIuJgNGLk7NWTNBQNOei00AKGvAKMAAAFjYSa0zAAAA' }

the data has 5 points compressed, are

[
  [1571633880000, 0.00703125]
  [1571634180000, 0]
  [1571634480000, 0]
  [1571634780000, 0.0001953125]
  [1571635080000, 0]
]

and I ran the below query in loop for 50, and have seen missing either avg or max in some index, query: q=start:1571633880000 AND end:1571635080000 AND name:testMetrics&cf=metric{avg;max}

However, if I query for a particular aggregation it worked all the time.

Thanks, Rishi

Rishi0405 commented 4 years ago

Hi @FlorianLautenschlager,

Did you tried with any test case, did you find the root cause?

FlorianLautenschlager commented 4 years ago

Hi @Rishi0405,

sadly not until today. Had lots on my "work" plate... Hopefully i can have a look today or tomorrow.

FlorianLautenschlager commented 4 years ago

Hi @Rishi0405,

if found some time and solved the issue. I will publish a fixed version soon.

Best Regards Florian

Rishi0405 commented 4 years ago

Hi @FlorianLautenschlager

Thanks. :)

FlorianLautenschlager commented 4 years ago

Hi, just deployed a new version of chronix including this fix.

Rishi0405 commented 4 years ago

I just updated and tested. So far it is good. Thanks :)