Skip to content

bug: vertical sharding aggregation with absent displays shard by label #5204

Closed

Description

@yeya24

Describe the bug

    query_fuzz_test.go:169: case 0 results mismatch.
        instant query: count_values without (job) ("value", absent({series="7"}))
        res1: {series="7", value="1"} => 1 @[1678393035.187]
        res2: {__CORTEX_SHARD_BY__="CAEQAiIDam9i", series="7", value="1"} => 1 @[1678393035.187]
        {__CORTEX_SHARD_BY__="EAIiA2pvYg==", series="7", value="1"} => 1 @[1678393035.187]

Got this bug when running the PromQLsmith test.

Ran a query count_values without (job) ("value", absent({series="7"})). Here {series="7"} couldn't match anything so absent() is expected to return a series.

res1 is from non vertical sharding Cortex and it gives expected result. res2 runs vertical sharding Cortex and it gave me bad results and additional __CORTEX_SHARD_BY__ label.

Activity

  1. changed the title [-]bug: vertical sharding count_values gets hidden labels[/-] [+]bug: vertical sharding with count_values[/+] on Mar 9, 2023
  2. changed the title [-]bug: vertical sharding with count_values[/-] [+]bug: vertical sharding aggregation with `absent` displays shard by label[/+] on Mar 9, 2023
  3. yeya24 commented on Mar 9, 2023

    @yeya24
    ContributorAuthor

    Seems the count_values aggregation doesn't matter here.

        query_fuzz_test.go:168: case 17 results mismatch.
            instant query: max without (series) (absent({__name__="test_series"}))
            res1: 
            res2: {__CORTEX_SHARD_BY__="CAEQAiIGc2VyaWVz"} => 1 @[1678393609.301]
    

    Got another case with max and absent that displays the additional shard label.

  4. yeya24 commented on Mar 9, 2023

    @yeya24
    ContributorAuthor

    Probably we should just disable absent and absent_over_time for vertical sharding and then this can be resolved.

  5. yeya24 commented on Mar 9, 2023

    @yeya24
    ContributorAuthor

    Should be solved by thanos-io/thanos#6201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions