Skip to content

Conversation

@adibrastegarnia
Copy link
Contributor

No description provided.

@adibrastegarnia adibrastegarnia requested a review from kuujo February 4, 2020 19:20
type Index uint64

// Version is the version of an entry
type Version uint64
Copy link
Member

Choose a reason for hiding this comment

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

We don’t need a version because entries are immutable. Versions are only needed for optimistic locking when updating objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Remove(ctx context.Context, index int64, opts ...RemoveOption) (*Entry, error)

// Len returns the number of entries in the log
Len(ctx context.Context) (int, error)
Copy link
Member

Choose a reason for hiding this comment

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

It seems like Size would be more appropriate if this is the number of entries. Len feels like it would be equal to LastIndex.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@kuujo
Copy link
Member

kuujo commented Feb 7, 2020

lgtm

@kuujo kuujo merged commit 96f6ea5 into atomix:master Feb 7, 2020
@adibrastegarnia adibrastegarnia deleted the log_primitive_client branch February 7, 2020 22:13
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.

2 participants