Skip to content

Conversation

@andylokandy
Copy link
Contributor

@andylokandy andylokandy commented Nov 22, 2021

Signed-off-by: Andy Lok andylokandy@hotmail.com

Summary

Allow eventually consistency on RawKV.

Motivation

Eventually consistency is acceptable in some scenarios when using RawKV. In this case, RawKV is allowed to break linear consistency and therefore improve the cluster-wise throughput.

Rendered

Signed-off-by: Andy Lok <andylokandy@hotmail.com>
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
@andylokandy
Copy link
Contributor Author

/cc @zz-jason @pingyu

@BusyJay
Copy link
Member

BusyJay commented Nov 23, 2021

What's the guarantees stale read provides? It seems there is no guarantee at all, client may read a key's value and then read no keys and then read the keys again even if there is no changes to the key.

@andylokandy
Copy link
Contributor Author

andylokandy commented Nov 23, 2021

@BusyJay This is exactly what eventually consistency means. To address these problems, the client can select the store with a satisfied RPO so that the freshness will not regress.

@iosmanthus iosmanthus self-requested a review June 3, 2022 12:57
@iosmanthus iosmanthus self-assigned this Jun 3, 2022
message RaftRequestHeader {
...
bool replica_read = 8;
+ bool direct_read = 9;
Copy link
Member

Choose a reason for hiding this comment

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

We already have the STALE_READ write batch flags, the new field may not be necessary.

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.

3 participants