SequenceHiLoGenerator Jumps 1 number each lo > maxLo

Description

When a new higth value is generated the new ids will be uselessly incremented by one.

Also the TableHiloGenerator had the same issue 1209 but the bug has been fixed only for it.

Environment

None

Activity

Show:
Frédéric Delaporte
November 14, 2017 at 5:56 PM

Migrated to #843.

korkless
June 9, 2016 at 3:30 PM

it's different, in java hibernate they used the same correct behaviour that we have with TableHileGenerator.
The class SequenceHiLoGenerator uses LegacyHiLoAlgorithmOptimizer

It's not a breaking change because in the current implementation we simply skip the first valid id to start from the next, the difference is that with the fix we will use all the available id in the hilo range

Oskar Berggren
June 9, 2016 at 3:22 PM

Is the current behaviour same or different compared to Java Hibernate?

One reason to avoid the change is that probably all apps using the same DB must upgrade NHibernate at exactly the same time. It might be better to switch to the newer enhanced identity generators (http://nhibernate.info/doc/nhibernate-reference/mapping.html#mapping-declaration-id-enhanced), which I'm hoping don't have the bug.

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created June 9, 2016 at 3:08 PM
Updated November 14, 2017 at 5:56 PM
Resolved November 14, 2017 at 5:56 PM
Who's Looking?