Skip to content

Need a way to opt back in to seeing VersionError #2097

@ethan-bernstein

Description

@ethan-bernstein

The new ability in v4.0.1 to open avoid VersionError is really interesting. However, it seems to break the usage of version upgrade logic in certain scenarios that are key for our application.

A common use case for our app is to add a new calculated property in one of our tables along with an index on that property. As part of the version definition, we add upgrade logic to calculate the new property for existing objects in the table.

When we roll out a new version of our app, we roll back the deployment if we see too many errors. When that happens, we fix the bugs leading to those errors and then roll out the new version of the app again.

Consider what happens during temporary rollback if the new version of the app contains one of these database version updates.

When a client first runs the new version of the app, the database version is updated, and the upgrade logic populates the new property for existing objects in the table. With v4.0.1, when the client goes back to running the older version of the app, the app still opens the database and may start writing objects to the table without the new property. When the client starts running the newer version of the app, the version upgrade logic does not run a second time and so the table is left with some objects that are missing the calculated property.

Are we missing some way in which we can get the version upgrade logic to run again when we roll forward to the newer version of the app a second time?

Or is there some way we can opt back in to seeing VersionError when trying to open a database version newer than what the current application understands?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions