Problem when upgrading NC 21.0 to 21.0.1 RC1

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version 21.0.1 RC1
Operating system and version Debian 10.9
Apache or nginx version Apache 2.4.38-3+deb10u4
PHP version 7.4

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Upgrade from NC 21.0 to 21.0.1 RC1
  • the upgrade itself went fine.
  • when I checked the Administration/Overview page of my site, there was a message: The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running.
  • When I issued the mentioned command, I got these errors:

Check indices of the share table.
Check indices of the filecache table.
Adding additional path index to the filecache table, this can take some time…

In ExceptionConverter.php line 114:

An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1089 Incorrect prefix key; the used key part isn’t a string, the used length is longer than the key part, or the storage engine doesn’t support unique prefix keys

In Exception.php line 26:

SQLSTATE[HY000]: General error: 1089 Incorrect prefix key; the used key part isn’t a string, the used length is longer than the key part, or the storage engine doesn’t support unique prefix keys

In Connection.php line 82:

SQLSTATE[HY000]: General error: 1089 Incorrect prefix key; the used key part isn’t a string, the used length is longer than the key part, or the storage engine doesn’t support unique prefix keys

db:add-missing-indices

When I upgraded my test server to 21.0.1 RC1, this happened:

  • the upgrade itself went fine.

  • when I checked the Administration/Overview page of my site, there was a message: The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running.

  • When I issued the mentioned command, I got these errors:

Check indices of the share table.
Check indices of the filecache table.
Adding additional path index to the filecache table, this can take some time…

In ExceptionConverter.php line 114:

An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1089 Incorrect prefix key; the used key part isn’t a string, the used length is longer than the key part, or the storage engine doesn’t support unique prefix keys

In Exception.php line 26:

SQLSTATE[HY000]: General error: 1089 Incorrect prefix key; the used key part isn’t a string, the used length is longer than the key part, or the storage engine doesn’t support unique prefix keys

In Connection.php line 82:

SQLSTATE[HY000]: General error: 1089 Incorrect prefix key; the used key part isn’t a string, the used length is longer than the key part, or the storage engine doesn’t support unique prefix keys

db:add-missing-indices

This is on a Debian 10.9 server, with PHP7.4 fpm and mariadb 10.3.27-0+deb10u1 installed. This did not happen before, all add-missing-indices in the past worked flawless.

Solved with 21.0.1 final.