Skip to content

Merge function should process items in order #841

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

Merged
merged 7 commits into from
Jun 4, 2019

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented May 31, 2019

With this commit, merge operator processes the items in the order of which they were inserted. Earlier it would be processed by the merge function in reverse order.

For instance, if A , B, C were inserted, and merge function was simple append operation, they would be passed to the merge function as

mergeFunc(C, B) => result CB
mergeFunc(CB, A) => result CBA

With this change, they're passed to the merge function as

mergeFunc(B, C) => result BC
mergeFunc(A, BC) => result ABC

This change is Reviewable

@jarifibrahim jarifibrahim requested a review from a team May 31, 2019 08:03
@jarifibrahim jarifibrahim changed the title Merge Operator should process items in order Merge function should process items in order May 31, 2019
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

Got a comment.

Reviewed 1 of 2 files at r1, 2 of 2 files at r2.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @ashish-goswami, @jarifibrahim, and @manishrjain)


README.md, line 288 at r2 (raw file):

```Go
func uint64ToBytes(i uint64) []byte {

Don't remove this. It is important to show how to deal with integer addition.

You can just additionally add the ABC example to show how merge operator maintains ordering.

Copy link
Contributor Author

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @ashish-goswami and @manishrjain)


README.md, line 288 at r2 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Don't remove this. It is important to show how to deal with integer addition.

You can just additionally add the ABC example to show how merge operator maintains ordering.

Done. Added the counter increment example to the readme.

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r3, 1 of 1 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@jarifibrahim jarifibrahim merged commit 18f8a33 into master Jun 4, 2019
@jarifibrahim jarifibrahim deleted the ibrahim/fix-merge-func branch June 4, 2019 08:08
@campoy
Copy link
Contributor

campoy commented Jun 19, 2019

I'm reviewing all the PRs merged since our latest release and checking whether they impact our users.
I'd say this one doesn't, please let me know if that's not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants