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

[Internal] CTL: Adds query scenario #2701

Merged
merged 14 commits into from
Sep 14, 2021
Merged

[Internal] CTL: Adds query scenario #2701

merged 14 commits into from
Sep 14, 2021

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Sep 3, 2021

This PR adds a new scenario for query where we:

  1. Insert X amount of documents
  2. Start 3 queries:
    1. select * from c - cross partition get all documents
    2. select count(1) from c - cross partition aggregation
    3. select * from c order by c.id - cross partition order by
  3. For each type of query we:
    1. Iterate on the query using continuation tokens
    2. Drain the query completely
  4. Verify all inserted documents were read in all conditions.

In case there was an error or the query did not get all the inserted documents, we produce the error log including all continuations involved for debugging purposes.

Extra changes for quality

The PR also polishes the code by removing duplicated code across scenarios and putting it inside the shared Utils file.

For ChangeFeedProcessor scenario we also add validation that the number of documents received matches the documents inserted.

For ChangeFeedPull scenario, changing the metric to a gauge instead of a counter yields clearer results, because it shows the total number of read documents instead of an ever increasing counter.

@ealsur ealsur added the Engineering engineering improvements (CI, tests, etc.) label Sep 3, 2021
@ealsur ealsur self-assigned this Sep 3, 2021
@ealsur ealsur merged commit f5e1ae6 into master Sep 14, 2021
@ealsur ealsur deleted the users/ealsur/ctlquery branch September 14, 2021 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering engineering improvements (CI, tests, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants