Skip to content

2024.2.4.0-b6

@kai-franz kai-franz tagged this 03 May 04:49
Summary:
Original commit: 98d8352d9a331e2888629a093f66ee5403b7951e / D43650
Currently, `org.yb.pgsql.TestYsqlUpgrade.migratingIsEquivalentToReinitdb` fails on backports due to a bug in how it calculates the expected version numbers in the applied migration scripts.

For example:

We have the initial version = 77.0, final version = 78.1. So there are 2 migration scripts to apply: one to go from 77.0 to 78.0, and one to go from 78.0 to 78.1.

The first one (77.0->78.0) is okay. But the next one (78.0->78.1) is an issue: the test calculates the expected major version to be `min(2, 78) + 77=79` so it expects to see a script migrating to v79.0. But this is a mistake and it should actually calculate the expected major version as `min(2 + 77, 78)=78`.

This diff fixes the test by updating the version calculation. It also renames the variable `ver` to `i` to avoid confusion (originally, the initial version was always 0, so this variable was always equal to the version, but that is no longer the case).
Jira: DB-16500

Test Plan: Manual testing on D43637

Reviewers: myang

Reviewed By: myang

Differential Revision: https://phorge.dev.yugabyte.com/D43670
Assets 2
Loading