Commit graph

9 commits

Author SHA1 Message Date
Andreas Brandl
f2cc1169e8 Remove double-checked internal id generation.
This was needed for a transition phase only. For details see #45389.

Closes #45389.
2018-05-28 12:46:03 +02:00
Andreas Brandl
9ea2fc85a3 Atomic internal ids for all models 2018-04-20 14:00:15 +00:00
Andreas Brandl
14acbf2455 Double-check next value for internal ids.
This is useful for a transition period to migrate away from
`NoninternalAtomicId`. In a situation where both the old and new code to
generate a iid value is run at the same time (for example, during a
deploy different nodes may serve both versions), this will lead to
problems regarding the correct `last_value`. That is, what we track in
`InternalId` may get out of sync with the maximum iid present for
issues.

With this change, we double-check that and correct the `last_value` with
the maximum iid found in issues if necessary.

This is subject to be removed with the 10.8 release and tracked over
here: https://gitlab.com/gitlab-org/gitlab-ce/issues/45389

Closes #45269.
2018-04-16 13:59:20 +02:00
Andreas Brandl
fb6d6fce5a Address review comments. 2018-03-16 13:35:27 +01:00
Andreas Brandl
539bdf73be Address review comments. 2018-03-16 13:35:27 +01:00
Andreas Brandl
d374d0be1a Backwards-compat for migration specs.
The specs are based on a schema version that doesn't know about
`internal_ids` table. However, the actual code being execute relies on
it.
2018-03-16 13:35:26 +01:00
Andreas Brandl
3fa2eb4e10 Refactor, extract class and improve comments. 2018-03-16 13:35:25 +01:00
Andreas Brandl
0360b0928a More flexible way of internal id generation. 2018-03-16 13:35:25 +01:00
Andreas Brandl
754272e392 Atomic generation of internal ids for issues. 2018-03-16 13:35:25 +01:00