-
Notifications
You must be signed in to change notification settings - Fork 874
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
Proto definition for multi cursor queue persistence states #3035
Conversation
|
||
message QueueState { | ||
map<int32, QueueReaderState> reader_states = 1; | ||
int64 exclusive_max_read_key = 2; |
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.
This is the boundary of read & write zone. Needed since the slice with the highest max key can be completed and removed before other slices. Or there can be no slices at all if the process for all pending slices are completed.
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.
should this be a struct (not int64, e.g. timer)
and can you find a better name
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.
I can define a separate struct for task key and persist both the fire time and the taskID (and use it in QueueSliceRange as well).
But since the actual read/delete persistence api only supports querying either time or taskID, persisting one value seems sufficient to me. Let me know.
I tried.. naming is so hard, maybe readerHighWatermark? Any suggestions?
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.
Defined new taskKey
message and used it here and in QueueSliceRange.
Renamed the field to exclusive_reader_high_watermark
.
message AllPredicateAttributes { | ||
} | ||
|
||
message EmptyPredicateAttributes { | ||
} |
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.
All vs None? Full vs Empty?
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.
I used to call them All/None. But later I found "Empty set" is a math term so I renamed to that. The term for All is universal, which is not that intuitive so didn't change to that.
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.
Renamed All -> Universal, so that they corresponds to Universal and Empty set in math.
What changed?
Why?
How did you test it?
Potential risks
Is hotfix candidate?