> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migration notes

This page explains the changes required to migrate to the stated version
of Atoti What-If.

## Migrate to 4.0.4-AS6.1

Upgrading from version 4.0.3-AS6.1, see [Atoti What-If 4.0.4-AS6.1 Release Notes](https://docs.activeviam.com/solutions/libraries/what-if/5.0/dev/dev-release/previous-versions/4.0/release-notes-4.0.md#404-as61).

Atoti What-If is using Atoti Server 6.1.11.

For new features and fixes included in these releases, please see the [Release notes for Atoti Server](https://docs.activeviam.com/products/atoti/server/6.1.11/docs/release/changelog/).

### Headline announcement

* **Deprecated consistency checks**: The `isConsistentStatus()` method in the `RestDistributedDatabaseService` is now deprecated.
* **REST services throw appropriate errors**: The `DatabaseSimulationsRestService` now throws appropriate exceptions when simulations fail.

### Deprecated consistency checks

Due to 1-phase-commits introduced in the previous version, the distributed REST service no longer needs consistency checks. As these checks are also likely to impact parallel executions, the checks have been removed and the `isConsistentStatus()` method deprecated and set to always return `true`.

### Exceptions in REST services

The `DatabaseSimulationsRestService` will now throw exceptions when simulations (or other actions) fail. Spring will handle these exceptions and provide problem details as a response to the request.

## Migrate to 4.0.3-AS6.1

Upgrading from version 4.0.2-AS6.1, see [Atoti What-If 4.0.3-AS6.1 Release Notes](https://docs.activeviam.com/solutions/libraries/what-if/5.0/dev/dev-release/previous-versions/4.0/release-notes-4.0.md#403-as61).

Atoti What-If is using Atoti Server 6.1.0.

For new features and fixes included in these releases, please see the [Release notes for Atoti Server](https://docs.activeviam.com/products/atoti/server/6.1.0/docs/release/changelog/).

### Headline announcement

* **Deprecated `DatabaseSimulationPersistenceManager`**: Due to performance issues as the number of simulations grows, the `DatabaseSimulationPersistenceManager` is now deprecated.

### Deprecated `DatabaseSimulationPersistenceManager`

The `DatabaseSimulationPersistenceManager` has severe performance issues as the number of simulations grows, due to the increase in branch switching (moving from one branch to another). Please use `HibernateSimulationPersistenceManager` or `HibernateAuditablePersistenceManager` instead.

## Migrate to 4.0.2-AS6.1

Upgrading from version 4.0.1, see [Atoti What-If 4.0.2-AS6.1 Release Notes](https://docs.activeviam.com/solutions/libraries/what-if/5.0/dev/dev-release/previous-versions/4.0/release-notes-4.0.md#402-as61).

No migration steps are required.

## Migrate to 4.0.1-AS6.1

Upgrading from version 4.0.0, see [Atoti What-If 4.0.1-AS6.1 Release Notes](https://docs.activeviam.com/solutions/libraries/what-if/5.0/dev/dev-release/previous-versions/4.0/release-notes-4.0.md#401-as61).

No migration steps are required.

## Migrate to 4.0.0-AS6.1

Upgrading from version 3.0.4, see [Atoti What-If 4.0.0-AS6.1 Release Notes](https://docs.activeviam.com/solutions/libraries/what-if/5.0/dev/dev-release/previous-versions/4.0/release-notes-4.0.md#400-as61).

Atoti What-If is using Atoti Server 6.1.0.

For new features and fixes included in these releases, please see the [Release notes for Atoti Server](https://docs.activeviam.com/products/atoti/server/6.1.0/docs/release/changelog/).

### Headline announcement

* **Java 21**: Atoti What-If has been upgraded to Java 21.
* **Atoti Server 6.1.0**: Atoti What-If has been upgraded to Atoti Server 6.1.0.
* **Removed IDistributedQueryResultsMerger methods**: The `IDistributedQueryResultsMerger` interface has been updated to reflect the core database service API.
* **The DatabaseSimulationsRestService now matches Atoti Server REST services**: The `DatabaseSimulationsRestService` is correctly added to the Atoti Server versions REST endpoint. The namespace and path have also been updated to match Atoti Server REST services.

### Version upgrades

Atoti What-If has been upgraded to Java 21, and Atoti Server 6.1.0. This upgrade is not backwards compatible and therefore will require a similar upgrade on the application side.

### Removed IDistributedQueryResultsMerger methods

The core API no longer returns any value when branches are deleted or fast-forwarded, so the methods merging results from multiple remote database services have been removed from the distributed query results merger.

### The `DatabaseSimulationsRestService`

The REST service is now added to the Atoti Server versions REST service through the `AtotiRestController` annotation.

The namespace, version and path have also been changed to match the Atoti Server REST services:

<table><thead><tr><th>Part</th><th>Old</th><th>New</th></tr></thead><tbody><tr><td>Namespace</td><td>`what-if/`</td><td>`/activeviam/what-if`</td></tr><tr><td>Version</td><td>`2`</td><td>`v3`</td></tr><tr><td>Path</td><td>`/services/rest/what-if/`</td><td>`/activeviam/what-if/rest/v3`</td></tr></tbody></table>
