Repository navigation
Critical changes for developers & admins for Nextcloud 21 #23210
Description
Activity
- changed the title
[-]Critical changes for developers & admins for Nextcloud 20[/-][+]Critical changes for developers & admins for Nextcloud 21[/+]on Oct 6, 2020 - pinned this issue
on Nov 13, 2020 What about the discontinued support of MySQL 5.7? This seems to be an essential one, but users are rather left alone with this issue. Why has this support been dropped and what has changed so that 5.7 cannot be used any longer?
The library we use for database interaction (Doctrine/DBAL) dropped support for MySQL 5.7
Not sure what you mean by left alone. You see a warning on Nextcloud 20 about it, and hitting any search engine with "mysql update 5.7 to 8.0" brings up guides in all kind of languages.Reacted by Kai and Christoph WurstAlso has we had to learn the hard way there are some ugly bugs in mysql 5.7 that they only fixed for 8.x and later nextcloud/mail#4412
The library we use for database interaction (Doctrine/DBAL) dropped support for MySQL 5.7
Not sure what you mean by left alone. You see a warning on Nextcloud 20 about it, and hitting any search engine with "mysql update 5.7 to 8.0" brings up guides in all kind of languages.Regarding being left alone: If you do not use your own (virtual) server, you can only use those services that your provider offers. While this obviously applies mainly to smaller installations, I guess this affects many private Nextcloud users.
I do not have a full overview but can at least share some insights: Quite a few smaller hosting companies use Plesk to offer services to their customers. Plesk only started very recently to allow switching to MySQL 8 (and the process to do so related to their platform is not well-documented). As you can expect, it may therefore take a while until these hosting platforms will be upgraded to MySQL 8. Similarly, I just double-checked with one of my own accounts at 1&1 Ionos (which is still one of the largest providers in Germany): At least in my services package, they only allow the creation of MySQL 5.7 databases. It seems that the same for instance applies to Strato and netcup. This means that all these users are either forced to switch to running their own server, switch providers, or wait until their provider may be chance offer MySQL 8. Until then, they are forced to stay with NC 20, which only will receive updates until this fall.
Luckily I am running my own server, but due to potential side effects and multiple services running, I also did not try to upgrade MySQL and, thus, am stuck at NC20.Reacted by ppochon, bjoernv, graue70, Artur Weigandt, Jérôme Lanteri and Nathan FishUntil then, they are forced to stay with NC 20, which only will receive updates until this fall.
This should be a long enough time period.
Reacted by cmroanirgo and bluikko- unpinned this issue
on Apr 1, 2021 22 TIcket at #26407
@nickvergessen I checked dbal's documentation and saw no mention of mysql 5.7 deprecation. Can you point us where this information is? Version 3 (current version) seems to support versions 5 and up. Nextcloud code seems to be using
MySqlPlatformwhich is for verion 5 and up and notMySql57PlatformorMySql80Platformwhich are specific for newer versions. See:https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/platforms.html
On another note, for example Godaddy and Dreamhost, and a lot of other hosting companies only support mysql 5.5 and 5.7 but not 8.0. Is there anything that blocks mysql 5.7 from working?
Reacted by bjoernv and cmroanirgoIn Mail we recently had lots of trouble with MySQL 5.7 as the DB started to seemingly reuse deleted primary key and then some dangling pointers pointed to unrelated data rows. Turns out only MySQL8 fixed that.
Until then, they are forced to stay with NC 20, which only will receive updates until this fall.
This should be a long enough time period.
@nickvergessen I think you underestimate how slow many providers are!
Reacted by bjoernv, bluikko and Nathan Fish@nickvergessen There seems to be a dangerous issue right now: It seems that the updater on a MySQL 5.7 instance automatically tries to upgrade from NC 20.0.8 directly to NC 21.0.1 (instead of 20.0.9) without any warning (see #26472). So in case MySQL 5.7 is not supported by NC21, this should clearly not happen (see also #26470).
In Mail we recently had lots of trouble with MySQL 5.7 as the DB started to seemingly reuse deleted primary key and then some dangling pointers pointed to unrelated data rows. Turns out only MySQL8 fixed that.
@ChristophWurst so is the Mail app the only problematic app?
@ChristophWurst so is the Mail app the only problematic app?
No, the same problem affects any other application.
@ChristophWurst so is the Mail app the only problematic app?
No, the same problem affects any other application.
Any idea how / if we could fix the MySQL issues? As mentioned above and confirmed by @cesarizu it would really help people if we can continue using MySQL 5.7 beyond September 2021.
@ChristophWurst, does this mean, that all Mail apps in NC <= 20 are broken, if NC is used with MySQL <= 5.7 or does the issues with MySQL <= 5.7 only apply for recent Mail apps used in NC >= 21?
I read about this re-using issue of AUTO_INCREMENT primary keys in MySQL 5.7. This happens when the MySQL server is re-started, because the AUTO_INCREMENT offset is only stored in memory in MySQL <= 5.7.
it happens with any version of nextcloud or mail as you research confirms.
I'm sorry to heat this up again. I installed Nextcloud 22 using Docker yesterday and I connected it to a central MySQL server, which is still MySQL 5.7. To be honest, the behavior/bug of the primary keys is the same since 2003, so this should not be a big surprise for any one: https://stackoverflow.com/a/18692168/11885414
So far my Nextcloud is running fine and i do not use the mail app. Is it safe to run my Nextcloud setup with MySQL 5.7 for now? I will update to MySQL 8, hopefully in Q1 2022.
Reacted by cmroanirgo and bluikkoGood to hear that NC 22 seems to work with MySQL 5.7 if not using mail or other special apps. I am sure I am not alone having a shared MySQL cluster where several apps do not support 8.0 yet - so I could not upgrade MySQL to 8.0 just because of NC 22.
For me NC 21 has also been fine with 5.7 so far. What about NC23?
@nook24 please do report back if you find something broken when using 5.7.
To be honest it sounds like a copout to point to autoinc columns behavior in pre-8.0 - why would you have rows with foreign keys that point to deleted rows in the first place?Edit: almost 1 year later we're still no closer to upgrade MySQL cluster to 8.0. We are now running NC 22 which of course no longer gets updates and are looking at updating to NC 23 (which also already no updates). There have been some reports that seem to indicate NC 23 in a very basic use will work with MySQL 5.7 so will test this soon.
Continuation of #20953
Front-end
tbd
Deprecated global variables
Backend
Removed from public namespace:
OCP\Settings\ISectionin favor ofOCP\Settings\IIconSectionRemove ISection in favor of IIconSection #23770OCP\AppFramework\Http\OCSResponseRemove deprecated OCSResponse #23827OCP\Router\IRouter::getRoutingFilesRemove some IRouter methods #21716OCP\Router\IRouter::getCacheKeyRemove some IRouter methods #21716OCP\Router\IRouter::loadRoutesRemove some IRouter methods #21716OCP\Router\IRouter::useCollectionRemove some IRouter methods #21716OCP\Router\IRouter::getCurrentCollectionRemove some IRouter methods #21716OCP\Router\IRouter::matchRemove some IRouter methods #21716OCP\Router\IRouter::getGeneratorRemove some IRouter methods #21716OCP\Router\IRouter::generateRemove some IRouter methods #21716Removed from private namespace:
OC\Hooks\ForwardingEmitterandOC\Hooks\LegacyEmitterRemove unused private ForwardEmitter and LegacyEmitter #23766OCA\Files_External\MountConfig::registerBackend,OCA\Files_External\MountConfig::getPersonalMountPointsandOCA\Files_External\MountConfig::setUserVarsRemove unused and deprecated methods from files_external MountConfig #24038OC\Router\Router::getCacheKeyRemove some IRouter methods #21716Deprecations
OCP\EventDispatcher\IEventDispatcher::dispatchin favor ofdispatchTypedDeprecate \OCP\EventDispatcher\IEventDispatcher::dispatch #23724OCP\Util::connectHookandOCP\Util::emitHookin favor ofaddListeneranddispatchTypedofOCP\EventDispatcher\IEventDispatcherDeprecate OCP\Util::connectHook and emitHook #23768OCP\Files\Storage\INotifyStorage::listenin favor ofOCP\Files\Storage\INotifyStorage::notify()->listen()Remove deprecated INotifyStorage::listen #23771OC_DB::prepareandOC_DB::executeAuditedDeprecate OC_DB::prepare and OC_DB::executeAudited as they leak cursors #23929EncryptionFileHelperandEncryptionKeyStorageare deprecated (useOCP\Encryption\IFile::classandOCP\Encryption\Keys\IStorage::classinstead) Auto-wire as much as possible in the encryption app #24064Deprecations of Events & Hooks
\OC\User::postCreateUserOCP\User\Events\CreateUserEvent\OC\SubAdmin::postCreateSubAdminOCP\Group\Events\SubAdminAddedEventOC_SubAdmin::post_createSubAdmin(was removed)OCP\Group\Events\SubAdminAddedEvent\OC\SubAdmin::postDeleteSubAdminOCP\Group\Events\SubAdminRemovedEventOC_SubAdmin::post_deleteSubAdmin(was removed)OCP\Group\Events\SubAdminRemovedEventOC_Group::pre_createGroup(was removed)OCP\Group\Events\BeforeGroupCreatedEvent(since NC 17)OC_User::post_createGroup(was removed)OCP\Group\Events\GroupCreatedEvent(since NC 17)OC_Group::pre_deleteGroup(was removed)OCP\Group\Events\BeforeGroupDeletedEvent(since NC 17)OC_User::post_deleteGroup(was removed)OCP\Group\Events\GroupDeletedEvent(since NC 17)OC_Group::pre_addToGroup(was removed)OCP\Group\Events\BeforeUserAddedEvent(since NC 17)OC_Group::post_addToGroup(was removed)OCP\Group\Events\UserAddedEvent(since NC 17)\OC\User::preCreateUserOCP\User\Events\BeforeUserCreatedEvent(since NC18)OC_User::pre_createUserOCP\User\Events\BeforeUserCreatedEvent(since NC18)\OC\User::postCreateUserOCP\User\Events\UserCreatedEvent(since NC18)OC_User::post_createUserOCP\User\Events\UserCreatedEvent(since NC18)\OC\User::preDeleteOCP\User\Events\BeforeUserDeletedEvent(since NC18)OC_User::pre_deleteUserOCP\User\Events\BeforeUserDeletedEvent(since NC18)\OC\User::postDeleteOCP\User\Events\UserDeletedEvent(since NC18)OC_User::post_deleteUserOCP\User\Events\UserDeletedEvent(since NC18)OCP\Files\Cache\CacheInsertEventOCP\Files\Cache\CacheEntryInsertedEventOCP\Files\Cache\CacheUpdateEventOCP\Files\Cache\CacheEntryUpdatedEventBehavorial changes