-
Notifications
You must be signed in to change notification settings - Fork 538
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
Native ETag Support #675
base: main
Are you sure you want to change the base?
Native ETag Support #675
Conversation
77487f1
to
d564238
Compare
b126e5e
to
da48417
Compare
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.
Not finished with review yet but sending a few comments now
f6cef7c
to
c832f71
Compare
5c6c87e
to
e7a90c8
Compare
BDN BenchmarkCommit: 4e327b4 of my branch BenchmarkDotNet v0.14.0, Windows 11 (10.0.22631.4602/23H2/2023Update/SunValley3) Job=.NET 8 EnvironmentVariables=DOTNET_TieredPGO=0 Runtime=.NET 8.0
Commit: 635cd58 of main branch BenchmarkDotNet v0.14.0, Windows 11 (10.0.22631.4602/23H2/2023Update/SunValley3) Job=.NET 8 EnvironmentVariables=DOTNET_TieredPGO=0 Runtime=.NET 8.0
|
f3ba0c1
to
1d05e69
Compare
Native ETag Support
Garnet provides support for ETags on raw strings. You can associate any string-based key-value pair inserted into Garnet with an automatically updated ETag.
Compatibility with non-ETag commands and the behavior of data inserted with ETags are detailed in the markdown for garnet specific commands. Please read the markdown file for API contracts, and compatibility.
HLD:
RecordInfo
for a record indicated whether or not a record contains an ETag. This bit on the record info is used to indicate that the first 8 bytes of the payload of the record include a long data type that represents the eTag associated with the value that is present after the first 8 bytes.Reads don't modify the eTag, but any RMW operations do. Blind Upsert (SET) will remove the eTag unless sent with the RETAINETAG flag.
ETags are incremented on each update, and the user can use them to handle things such as caching and Optimistic concurrency control.