-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Added TimeBasedUuid offset #5995
Conversation
Let me know when it's ready for review - is this for Cassandra only or it intended for other Akka.Persistence journals as well? |
e69077b
to
b58454f
Compare
/// Represents a v1 uuid | ||
/// </summary> | ||
internal struct TimeUuid : IEquatable<TimeUuid>, IComparable<TimeUuid> | ||
{ |
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.
TimeUuid
implementation has been pulled into the code to enable proper testing.
@Aaronontheweb this approach is done. I'm looking for feedback to either wrap up this PR to be merged or look for alternatives. |
b58454f
to
c587d23
Compare
@ismaelhamed I think the one thing I was looking for was some input from @to11mtm since he's implemented something very similar in Linq2Db. Other than that, I'll give this a review early next week and try to get it staged in our first 1.5 beta release. |
@Aaronontheweb probably better to use this for consistency. |
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
public class OffsetSpec | ||
{ | ||
[Fact] | ||
public void TimeBasedUuid_offset_must_be_ordered_correctly() |
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
@ismaelhamed this looks good to me - you ready for me to merge it? |
c587d23
to
56a9056
Compare
56a9056
to
40356c7
Compare
@Aaronontheweb, it's ready. |
Changes
Adds TimeBasedUuid offset used in Cassandra.
Sadly, there's no built-in support for time-based guids in .NET. The CSharp cassandra driver has a struct (
TimeUuid
) compatible withv1
ofjava.utils.uuid
. And since we can't have a reference to the cassandra driver in the Core, this implementation of theTimeBasedUuid
takes aGuid
instead. But then there's no way to check whether theGuid
passed toTimeBasedUuid
is actually aTimeUuid
.TimeUuid
code has been pulled into the Tests to enable proper testing.Feedback?
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):