-
Notifications
You must be signed in to change notification settings - Fork 290
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
Change strict reading PG to only return rows when valid #2219
Conversation
8c341b4
to
cdc7f5a
Compare
This is necessary for the error and retry logic to work in the strict read proxy
cdc7f5a
to
79c24fd
Compare
@@ -79,14 +79,14 @@ func TestReplicatedReaderReturnsExpectedError(t *testing.T) { | |||
} | |||
|
|||
type fakeDatastore struct { | |||
isPrimary bool | |||
revision datastore.Revision | |||
state string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I can have more test cases
require.NotEmpty(found) | ||
|
||
// Perform a read at a manually constructed revision beyond head, which should fallback to the primary. | ||
badRev := postgresRevision{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you test the replica and make sure it does return error with this revision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do in the other test
This is necessary for the error and retry logic to work in the strict read proxy