-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Added Online Read Range functionality for Redis #318
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
Conversation
| end := start + PIPELINE_BATCH_SIZE | ||
| if end > len(members) { | ||
| end = len(members) | ||
| } |
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.
Condense to one line
| end := start + PIPELINE_BATCH_SIZE | |
| if end > len(members) { | |
| end = len(members) | |
| } | |
| end := max(start + PIPELINE_BATCH_SIZE, len(members)) |
| switch skf.Order.Order { | ||
| case core.SortOrder_DESC: | ||
| return !effective | ||
| case core.SortOrder_ASC, core.SortOrder_INVALID: |
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.
Let SortOrder_INVALID be handled by the default. It shouldn't actually come up given our validations.
| } | ||
|
|
||
| // DecodeFeatureValue Helper function to decode feature value protobuf | ||
| func DecodeFeatureValue(raw interface{}, fv, fn, member string) (interface{}, serving.FieldStatus) { |
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.
It looks like this is a common function for redis and valkey, it should be moved to the utils file.
piket
left a comment
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.
LGTM
What this PR does / why we need it:
Added Online Read Range functionality for Redis.
The core behavior is:
Which issue(s) this PR fixes:
Misc