HiLo optimizer for enhanced TableGenerator not Generating next value correctly when called from different processes

Description

The hilo optimizer is not calculating the correct id when called from two different processes.

You will get Primary key Violations if you use the enhanced tablegenerator with hilo and two different processes sharing the same db.

Once the optimizer reaches the upper limit of a bucket it should get a new one from db and use it to calculate the new bucket. This does not happen.

The code:

Should be something like:

Environment

None

Assignee

Unassigned

Reporter

Tomas Gerhardsen

Labels

None

Components

Affects versions

Priority

Critical
Configure