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

Use the entire schema when hashing an introspection query #5007

Merged
merged 10 commits into from Apr 25, 2024

Conversation

Geal
Copy link
Contributor

@Geal Geal commented Apr 23, 2024

Fix #5006

in #4883 we introduced a query hashing scheme that stays stable across schema updates if the update does not affect the query. Unfortunately, it was not taking introspection queries into account.
This fixes the hashing mechanism to add the schema string to hashed data if we encounter an introspection field. This is a temporary fix until we move introspection execution out of query planning. At that point, this hashing mechanism won't ever see introspection fields.

This PR starts from the 1.44.0 tag, since the bug was introduced there. It will be easy to update it to either 1.45 or the latest dev, depending on when we want to ship that fix


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Tests added and passing3
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

abernix and others added 3 commits April 23, 2024 06:53
Add indentation to indicate labels are associated with the above metric.

Thanks!

Co-authored-by: Geoffroy Couprie <apollo@geoffroycouprie.com>
…#4848)

replace trait implementation for supergraph_service from
router::BoxService to supergraph::BoxService

Co-authored-by: Geoffroy Couprie <apollo@geoffroycouprie.com>
@Geal Geal requested a review from a team April 23, 2024 17:32
@router-perf
Copy link

router-perf bot commented Apr 23, 2024

CI performance tests

  • step - Basic stress test that steps up the number of users over time
  • events_big_cap_high_rate_callback - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity using callback mode
  • large-request - Stress test with a 1 MB request payload
  • events - Stress test for events with a lot of users and deduplication ENABLED
  • xxlarge-request - Stress test with 100 MB request payload
  • events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • xlarge-request - Stress test with 10 MB request payload
  • step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • events_callback - Stress test for events with a lot of users and deduplication ENABLED in callback mode
  • no-graphos - Basic stress test, no GraphOS.
  • reload - Reload test over a long period of time at a constant rate of users
  • events_big_cap_high_rate - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity
  • events_without_dedup_callback - Stress test for events with a lot of users and deduplication DISABLED using callback mode
  • const - Basic stress test that runs with a constant number of users

@Geal Geal changed the base branch from dev to 1.45.1 April 24, 2024 07:04
@Geal Geal force-pushed the geal/schema-aware-hash-introspection branch from 4f91abe to b9b9d3c Compare April 24, 2024 07:06
@Geal Geal requested a review from a team as a code owner April 24, 2024 07:06
@goto-bus-stop goto-bus-stop self-requested a review April 24, 2024 08:06
Copy link
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's possible to add a test, that's my "requested change". You're free to dismiss this review.

@o0Ignition0o
Copy link
Contributor

Fixed in 433ba4b

Copy link
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests have been introduced. LGTM. thank you, @o0Ignition0o

@abernix abernix enabled auto-merge (squash) April 25, 2024 11:23
@abernix abernix disabled auto-merge April 25, 2024 16:41
@abernix abernix merged commit 062ff03 into 1.45.1 Apr 25, 2024
12 checks passed
@abernix abernix deleted the geal/schema-aware-hash-introspection branch April 25, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introspection query doesn't return latest schema changes when query plan is being persisted on Redis
6 participants