Skip to content

Entity cache fix: update the cache key with private info on the first call#5599

Merged
Geal merged 9 commits intodevfrom
geal/test-private-info-caching
Aug 6, 2024
Merged

Entity cache fix: update the cache key with private info on the first call#5599
Geal merged 9 commits intodevfrom
geal/test-private-info-caching

Conversation

@Geal
Copy link
Contributor

@Geal Geal commented Jul 3, 2024

This adds a test for private information caching and fixes an issue where private data was stored at the wrong key, so it did not appear to be cached


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.

@github-actions

This comment has been minimized.

@router-perf
Copy link

router-perf bot commented Jul 3, 2024

CI performance tests

  • const - Basic stress test that runs with a constant number of users
  • demand-control-instrumented - A copy of the step test, but with demand control monitoring and metrics enabled
  • demand-control-uninstrumented - A copy of the step test, but with demand control monitoring enabled
  • enhanced-signature - Enhanced signature enabled
  • events - Stress test for events with a lot of users and deduplication ENABLED
  • 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_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
  • events_callback - Stress test for events with a lot of users and deduplication ENABLED in callback mode
  • events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • events_without_dedup_callback - Stress test for events with a lot of users and deduplication DISABLED using callback mode
  • extended-reference-mode - Extended reference mode enabled
  • large-request - Stress test with a 1 MB request payload
  • no-tracing - Basic stress test, no tracing
  • reload - Reload test over a long period of time at a constant rate of users
  • step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • step-local-metrics - Field stats that are generated from the router rather than FTV1
  • step-with-prometheus - A copy of the step test with the Prometheus metrics exporter enabled
  • step - Basic stress test that steps up the number of users over time
  • xlarge-request - Stress test with 10 MB request payload
  • xxlarge-request - Stress test with 100 MB request payload

Geal added 3 commits July 8, 2024 09:56
When we do not know in advance if a query will get a `cache-Control:
private` header in response, we have to update the cache key used to
store the response to add the private id.
But this was done in every case, which resulted in data stored at
invalid cache keys
@Geal Geal marked this pull request as ready for review July 8, 2024 14:41
@Geal Geal requested a review from a team July 8, 2024 14:41
@Geal Geal requested a review from a team as a code owner July 8, 2024 14:41
Copy link
Contributor

@BrynCooke BrynCooke left a comment

Choose a reason for hiding this comment

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

This looks like a fix rather than just adding a test, so let's have a changelog unless this is completely new functionality.

Copy link
Contributor

@garypen garypen left a comment

Choose a reason for hiding this comment

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

This looks like a fix to the existing entity caching functionality, so we should have a changelog.

@Geal Geal changed the title test private info caching Entity cache fix: update the cache key with private info on the first call Jul 30, 2024
@Geal
Copy link
Contributor Author

Geal commented Jul 30, 2024

what was blocking the writing of the changelog?

@Geal Geal requested a review from BrynCooke July 30, 2024 16:18
@Geal
Copy link
Contributor Author

Geal commented Aug 5, 2024

there's a changeset now, so barring any new info, I'll merge this, because we have people who are trying out the private info caching

@Geal Geal requested a review from a team as a code owner August 5, 2024 09:58
@Geal Geal dismissed BrynCooke’s stale review August 6, 2024 12:14

the changelog was added

@Geal Geal merged commit d710128 into dev Aug 6, 2024
@Geal Geal deleted the geal/test-private-info-caching branch August 6, 2024 12:15
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.

4 participants