Skip to content

NH-3879 - SequenceHiLoGenerator Jumps 1 number each lo > maxLo #843

@nhibernate-bot

Description

@nhibernate-bot

korkless created an issue — 9th June 2016, 15:08:54:

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

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


Oskar Berggren added a comment — 9th June 2016, 15:22:35:

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.


korkless added a comment — 9th June 2016, 15:30:38:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions