fauxflake icon indicating copy to clipboard operation
fauxflake copied to clipboard

duplicate ids being generated

Open jorgheymans opened this issue 9 years ago • 4 comments

I was a bit surprised to see that this code in a unit test produces two duplicates:

        IdGenerator snowflake = IdGenerators.newSnowflakeIdGenerator();
        for (int i = 0; i < 10; i++) {
            String id = snowflake.generateId(1000).asString();
            System.out.println(id);
        }

output:

ffffffffffed8000
ffffffffffed8000
ffffffffffed8001
ffffffffffed8002
ffffffffffed8003
ffffffffffed8004
ffffffffffed8005
ffffffffffed8006
ffffffffffed8000
ffffffffffed8001

jorgheymans avatar Dec 08 '15 09:12 jorgheymans

note this is on a 'normal´ windows developer machine, not a docker container.

jorgheymans avatar Dec 08 '15 09:12 jorgheymans

This may be due to issue #5

jonross avatar Dec 08 '15 20:12 jonross

There are fixes that are not merged for months. Is this project still maintained? Is there an alternative?

static-max avatar Jul 06 '16 14:07 static-max

@rholder Any chances for new release with fixes from PRs?

lbialy avatar Aug 30 '16 11:08 lbialy