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

pcs: Use if-unmodified-since to avoid unnecessary rendering #1347

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

johngian
Copy link
Collaborator

@johngian johngian commented Jul 11, 2024

Replicate what Parsoid on RESTBase is doing to avoid unnecessary rendering from template changes.

  • From what it looks from prod metrics we do get changeprop requests that the job date is for content that has already been superseded (old events)
  • Currently parsoid is doing all the heavylifting that checks the if-unmodified-since and if the events are stale doesn't propagate more resource change events
  • By disabling pregeneration on parsoid and replacing the pregeneration trigger for PCS/summary with MW resource changes we end up with the same problem (and increased load).
  • This patch is replicating the logic from parsoid to PCS/Summary endpoints

@johngian
Copy link
Collaborator Author

I think now with the fix for summary endpoint this is ready for review @brightbyte

lib/mwUtil.js Outdated Show resolved Hide resolved
sys/key_value.js Outdated Show resolved Hide resolved
* Compare tid with if-unmodified-since value to avoid rendering old content
* Rename the function to avoid confusion with `if-modified-since` header
@johngian johngian merged commit bd6f8c6 into wikimedia:master Jul 30, 2024
8 checks passed
@johngian johngian deleted the reduce-requests branch July 30, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants