If you are upgrading from a v3.4.x version, first check the following migration guide (to capture all the changes introduced in v4.0):

Migrating from v3.4.x to v4.0

If you are upgrading from v4.0 to v4.1.1, do not forget to check the migration guides for the previous versions:

Migrating from v4.0 to v4.1

If you are upgrading from v4.1 to v4.1.1, check the following migration guide:

Migrating from v4.1 to v4.1.1

Before upgrading to v4.1.1, we recommend executing the initial data partitioning DB migrations manually. We recommend this no matter if you enable partitioning or not, as these DB migrations could take a lot of time.

After executing manually the SQL commands from Liquibase, all existing process instance related information will go into the initial partition.

If partitioning is enabled, the initial partition will continue to be used until a new partition is generated according to the partitioning interval (DAY, WEEK, MONTH). Future partitions will be created automatically.

If partitioning is not enabled, all data will continue to be stored in this initial partition.

Partitioning docs