Skip to content
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

while replicating multimap, idGen updated accordingly #5284

Merged

Conversation

Projects
None yet
4 participants
@gurbuzali
Copy link
Member

commented May 12, 2015

fixes #5220

@gurbuzali gurbuzali force-pushed the gurbuzali:multimap-migration-fix branch from 5d005aa to 8fd9a81 May 12, 2015

@gurbuzali gurbuzali added this to the 3.4.3 milestone May 12, 2015

HazelcastInstance instance1 = factory.newHazelcastInstance();
MultiMap<Object, Object> mm1 = instance1.getMultiMap(name);
// populate multimap while instance1 is owner
// records will have ids from 0 to 10

This comment has been minimized.

Copy link
@jerrinot

jerrinot May 12, 2015

Contributor

records will have ids from 0 to 9?

This comment has been minimized.

Copy link
@gurbuzali

gurbuzali May 12, 2015

Author Member

yes, I've meant 10 as exclusive :)

@purplefox

This comment has been minimized.

I am not really familiar with the hazelcast code but I am guessing you are introducing this offset to minimise the probability of two nodes having overlapping sets of ids so that when they merge they do not clash?

If two nodes did have overlapping ids and they did merge would this cause problems?

@bwzhang2011

This comment has been minimized.

Copy link

commented May 12, 2015

@purplefox, maybe you could build the 3.4.3 snapshot with such p.r to make sure whether such is resovled or not.

@purplefox

This comment has been minimized.

Copy link

commented May 12, 2015

Yes I will test it :)

But if you could explain the rationale of the 1000000 offset that would help my confidence. If ids do (by some small chance) clash would there still be an issue?

@gurbuzali

This comment has been minimized.

Copy link
Member Author

commented May 12, 2015

Hi @purplefox before this fix when the owner of the entry changed (may happen when you've started new nodes) there may be same recordIds for the records. For example first you start a node and populate it, recordId starts from 0. then another node comes in and takes the ownership which results a migration. after migration if you put more entries they will start from 0 too, and it means overlapping.

The offset is just to be on the safe side, it is not the actual solution. if you take a look at the changes at MigrationService you will see that before inserting migrationData I'm calculating the maxRecordId by iterating all records. I'm just adding an offset to that maxRecordId to be on the safe side. it would be enough to add just 1.

gurbuzali added a commit that referenced this pull request May 18, 2015

Merge pull request #5284 from gurbuzali/multimap-migration-fix
while replicating multimap, idGen updated accordingly

@gurbuzali gurbuzali merged commit b0fb4b2 into hazelcast:maintenance-3.x May 18, 2015

1 check passed

default Merged build finished.
Details
@purplefox

This comment has been minimized.

Copy link

commented May 29, 2015

Can you tell me what release this will be in?

We need this fix along with the workaround I produced for #5220 in order to give a reasonably stable solution for our customers ASAP.

Any chance of an emergency patch release or similar?

@gurbuzali

This comment has been minimized.

Copy link
Member Author

commented May 29, 2015

We are planning to release 3.4.3 next week. I don't have an exact date since the internal testing time can vary.

@purplefox

This comment has been minimized.

Copy link

commented May 29, 2015

Ok thanks, the sooner the better from our perspective. Thanks for your efforts on this :)

@gurbuzali gurbuzali deleted the gurbuzali:multimap-migration-fix branch Jun 1, 2015

@purplefox

This comment has been minimized.

Copy link

commented Jun 8, 2015

Any news on the 3.4.3 release? This is getting critical for us now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.