-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken migration #7643
Fix broken migration #7643
Conversation
The existing version of the migration replaced null values with empty arrays. The presence of null values is used by the queries to discriminate create and exercise events. This caused an illegal state exception when reading active contracts for the API (which are represented by their create events on the events table) as the reader was mistakenly reading exercise events and create events. changelog_begin changelog_end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @stefanobaghino-da!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. How have you tested it?
...cipant-integration-api/src/main/scala/db/migration/postgres/V38__Update_value_versions.scala
Show resolved
Hide resolved
@SamirTalwar-DA Manual testing with in-house application. Inspected the database, ensured that functionality of the app. This error condition only pops up when using "very old" pre-1.0 ledgers and the compatibility tests cannot cover this, unfortunately. |
Sounds good, thanks! |
The existing version of the migration replaced null values with empty arrays. The presence of null values is used by the queries to discriminate create and exercise events. This caused an illegal state exception when reading active contracts for the API (which are represented by their create events on the events table) as the reader was mistakenly reading exercise events and create events. changelog_begin changelog_end
The existing version of the migration replaced null values with empty arrays. The presence of null values is used by the queries to discriminate create and exercise events. This caused an illegal state exception when reading active contracts for the API (which are represented by their create events on the events table) as the reader was mistakenly reading exercise events and create events. changelog_begin changelog_end Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
The existing version of the migration replaced null values with
empty arrays. The presence of null values is used by the queries
to discriminate create and exercise events. This caused an
illegal state exception when reading active contracts for the API
(which are represented by their create events on the events table)
as the reader was mistakenly reading exercise events and create
events.
changelog_begin
changelog_end
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.