Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix HTTP repl response to use minimum token #16578

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Oct 30, 2023

Follow on from #16473, where we tried to change the HTTP replication to return the minimum current token for a stream (as this is used to wait for a position in the stream). However, turns out we need to change this in two places, both the request and response.

@erikjohnston erikjohnston added the X-Release-Blocker Must be resolved before making a release label Oct 30, 2023
@erikjohnston erikjohnston marked this pull request as ready for review October 30, 2023 10:45
@erikjohnston erikjohnston requested a review from a team as a code owner October 30, 2023 10:45
@DMRobertson
Copy link
Contributor

Feels like we should have written a test for the cross-worker HTTP request case(?)

Comment on lines 435 to +436
response[_STREAM_POSITION_KEY] = {
stream.NAME: stream.current_token(self._instance_name)
stream.NAME: stream.minimal_local_current_token()
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remind me: why does the requester submit this information again? When submitted, should the requester submit the minimum or maximum current token?

Copy link
Member Author

Choose a reason for hiding this comment

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

This data is used so that the other side can "wait" until all the streams have advanced to the position included, i.e. when the instance starts processing the request/response it knows that e.g. all cache invalidations have correctly happened.

The difference between request/response here is fairly immaterial.

@erikjohnston erikjohnston merged commit 8c63e93 into develop Oct 30, 2023
39 of 41 checks passed
@erikjohnston erikjohnston deleted the erikj/fix_repl branch October 30, 2023 12:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
X-Release-Blocker Must be resolved before making a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants