Stop InNetwork from skipping cache hits and leaving a stale VF stamp - #136
Closed
Pitchfork-and-Torch wants to merge 1 commit into
Closed
Conversation
FollowedUserIds is request-fresh. InNetwork is a local HashSet lookup. Skipping it on has_cached_posts kept Redis in_network for 180s, so VF fetched TimelineHome or Recs from a follow graph that was already stale. Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
#128–#132 leftover.
InNetworkCandidateHydrator.enablewas!has_cached_posts. #131 called that out and left it.FollowedUserIdsQueryHydratorstill runs on a cache hit. InNetwork is a local HashSet lookup. Redis keeps the oldin_networkfor 180s.VFCandidateHydratorstill runs and bucketsTimelineHomevsTimelineHomeRecommendationsfrom that stamp.author_id = 0(Stop For You from stamping OON before TES fills author_id #128), then TES filled the author: the Redis row keepsin_network = false. Cache hit never restamps.CoreData stays skipped. TES is an RPC. Tweet
author_iddoes not change. #132 already covers NightOwlalready_hydrated. Gizmoduck stays skipped. VF still applies NSFW on the restamped safety level.Not #128 (order). Not #131 (TES overwrite). Not #132 (
already_hydrated).Fix
One file,
home-mixer/candidate_hydrators/in_network_candidate_hydrator.rs.enableis always true.Tests
enableis true onhas_cached_postscargo testcannot run. Public dump has no Home Mixer manifest. Same control flow compiled and run as a rustc model: 6/6 passed (old gate keeps the stale stamp; new gate restamps).