hazelcast/hazelcast — pull request #4286 by jerrinot (2014-12-11 10:19:41+00:00)
Title: Backport of #4275

When a partition is promoted from a backup to a primary then QueueContainer iterates through collection of existing backup values and set its own IDGenerator to the highest itemID found in backups.

However chances are the backup collection doesn't contain all records created by the old primary as some backup operations can still be in-flight. This leads to duplicated IDs generated by the new primary.

This fix simple adds an offset so the new owner always generates IDs significantly higher then the previous owner. The down-side is the generated ID are no longer continuous, but I don't see this as a problem.
(cherry picked from commit aadf683)