google-code-export / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
1 stars 0 forks source link

Monotonic does not guarantee uniqueness of generated numbers #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Memcache is off, lastMax is 100
2. Memcache goes up for 1 sec, five requests get 101, 102, ... 105 numbers for 
them
3. Memcache goes off again for 1 sec; requests from #2 are still preparing data 
to insert in the related datastore model
4. Memcache goes up, another five requests get 101, 102, ..., 105 numbers for 
them
5. now there are duplicate numbers. 

What is the expected output? What do you see instead?

I expect all numbers to be 100% unique.

What version of the product are you using? On what operating system?

Please provide any additional information below.

See discussion and a potential solution here: 
http://code.google.com/appengine/forum/java-forum.html?place=msg%2Fgoogle-appeng
ine-java%2F0jyyRSxkEXM%2FqJuBrgOGJpcJ

Original issue reported on code.google.com by michael....@gmail.com on 1 Jan 2011 at 4:47

GoogleCodeExporter commented 9 years ago
Monotonic was removed from the code some time ago for exactly this reason - it 
wasn't 100% effective.

Original comment by lhori...@gmail.com on 14 Apr 2014 at 12:07