nextcloud/lib/private
Louis Chemineau 8a2437927d fix: Initialize lastConnectionCheck after first connection
We are checking whether the DB connection is alive once every 30 seconds. But when we are lacking the last check time, we are skipping the check and reconnect logic. This is causing the reconnect logic to never fire in those cases.

It seems to me that "those cases", are actually always the case, as upon initialization, we are not using the proper connection name to store the time.

In the `connect()` logic, when `$this->_conn` is null, `$this->getConnectionName()` is returning `replica`, so `$this->lastConnectionCheck` will be equal to `['replica' => time()];`

60711ea4cf/lib/private/DB/Connection.php (L215-L221)

60711ea4cf/lib/private/DB/Connection.php (L891-L893)

2b6d7bf65f/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php (L136-L139)

Then, if the connection name ends up as being 'primary', the reconnect logic is skipped:

60711ea4cf/lib/private/DB/Connection.php (L874-L880)

Follow-up of https://github.com/nextcloud/server/pull/41819

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-02-25 11:07:34 +00:00
..
Accounts fix(AccountManager): Sanitize social media handles 2025-02-06 15:46:15 +01:00
Activity chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
App fix: Also remove digits at the start and underscore on both ends of appid 2025-02-19 18:39:20 +01:00
AppFramework fix(ratelimit): Allow to bypass rate-limit from bruteforce allowlist 2025-01-27 13:21:36 +00:00
Archive chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
Authentication fix: Handle exception when clearing previously removed two factor tokens 2024-11-05 11:14:05 +01:00
Avatar chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
BackgroundJob fix(cron): Keep job class limitation when searching for the next job 2025-02-19 09:28:34 +00:00
Blurhash/Listener fix(performance): use low resolution for blurhash 2025-01-29 10:44:15 +00:00
Broadcast/Events chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Cache refactor(filecache): Move to more strict typing 2024-11-25 10:29:51 +01:00
Calendar feat(ocp): add calendar api to retrieve availability of attendees 2025-01-13 10:12:31 +01:00
Collaboration chore(db): Apply query prepared statements 2024-10-17 20:30:47 +02:00
Command chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Comments Merge pull request #47329 from nextcloud/feat/add-datetime-qbmapper-support 2024-10-18 19:05:08 +02:00
Config fix(config): drop value details 2025-01-27 17:55:29 +00:00
Console fix(command): Make method compatible with upstream class (requires 3rdparty bump) 2024-10-07 12:11:25 +02:00
Contacts/ContactsMenu feat(contacts): Show time difference for users in different timezones 2025-01-16 18:10:04 +01:00
Dashboard fix(dashboard): Document expected icon behaviour 2024-07-11 13:14:03 +00:00
DB fix: Initialize lastConnectionCheck after first connection 2025-02-25 11:07:34 +00:00
Diagnostics feat(log): Allow to combine log.conditions to only log (app&user) 2024-07-30 13:18:09 +02:00
DirectEditing chore(db): Apply query prepared statements 2024-10-17 20:30:47 +02:00
Encryption chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
EventDispatcher chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Federation fix(ocm): simpler code 2024-12-04 09:30:55 -01:00
Files perf(files): faster query to fetch incomplete directories 2025-02-13 14:24:44 +00:00
FilesMetadata test: add some minimal testing for metadata storage 2024-11-07 16:27:16 +01:00
FullTextSearch chore: Use more gender neutral language 2024-10-14 13:59:24 +02:00
GlobalScale chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Group fix(OpenAPI): Adjust array syntax to avoid ambiguities 2024-11-05 09:58:11 +01:00
Hooks chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Http fix: remove superflous line 2024-11-09 11:56:19 +01:00
IntegrityCheck fix: skip the integrity check for nextcloud-init-sync.lock 2024-09-22 17:48:43 +02:00
KnownUser chore: Use more gender neutral language 2024-10-14 13:59:24 +02:00
L10N feat(l10n): Respect forceLanguage query parameter in more places 2024-10-08 15:40:40 +02:00
LDAP style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +02:00
legacy fix(util): Correctly create Reflection of method for PHP 8.3+ 2024-11-08 12:59:15 +01:00
Lock fix(locking): Accept mixed as value on setTTL 2024-10-14 12:17:27 +02:00
Lockdown refactor(Storage): Align all Storage constructors 2024-10-23 13:24:18 +02:00
Log fix(logger): Fix closure detection when filtering sensitive parameters 2024-11-08 12:59:14 +01:00
Mail feat(Mailer): add "null" SMTP transport mode 2024-11-19 11:32:39 +01:00
Memcache Merge pull request #46151 from nextcloud/enh/do-not-enforce-cache-for-cli 2024-10-29 15:28:47 +01:00
Migration chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
Net fix(net): Add IPv6 zone handling to IpAddressClassifier 2024-10-31 17:06:36 -04:00
Notification feat(prioritynotifications): Allow some apps to mark notifications as priority 2024-09-23 09:02:48 +02:00
OCM fix(federation): Fall back to old version flag 2024-12-09 16:20:48 +01:00
OCS chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
Preview fix(preview): Filter for folders in cleanup old preview job 2025-01-27 15:11:26 +00:00
Profile fix(FediverseAction): Ensure valid fediverse links are generated 2025-02-06 15:46:15 +01:00
Profiler fix(profiler): clear command does not work 2024-09-20 18:14:33 +02:00
Remote chore: fix some comments 2024-07-29 14:43:27 +08:00
Repair refactor: convert sanitize account properties repair step to background job 2025-02-24 15:23:20 +00:00
RichObjectStrings fix(ros): Copy better typing information from Notifications app 2024-11-11 07:27:00 +01:00
Route fix(files): properly forward open params from short urls 2025-02-18 12:42:23 +00:00
Search feat(search): reduce search providers via core app config unified_search.providers_allowed 2024-11-13 11:15:24 +01:00
Security fix(ratelimit): Allow to bypass rate-limit from bruteforce allowlist 2025-01-27 13:21:36 +00:00
Session fix(setup): ignore long session login during installation 2024-08-27 12:29:42 -01:00
Settings Merge pull request #48721 from nextcloud/feat/allow-getter-setter-decl-fors 2024-11-06 08:54:40 +01:00
Setup chore(db): Apply query prepared statements 2024-10-17 20:30:47 +02:00
SetupCheck chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
Share feat(share): make sharelink token length configurable 2024-09-28 08:06:24 +02:00
Share20 fix: Exclude non accepted shares when computing access list 2025-01-30 09:18:41 +00:00
SpeechToText fix(SpeechToTextManager): Throw TaskProcessing Task failed 2024-08-30 10:07:01 +02:00
Support feat(updatenotification): Add a limit to user count from LDAP so save performances 2025-01-14 12:26:24 +01:00
SystemTag feat(systemtags): add setting to block non admin to create system tags 2025-01-22 20:07:24 +01:00
Tagging feat(db): switch from settype to casts 2024-09-15 19:26:58 +02:00
Talk style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +02:00
TaskProcessing fix(TaskProcessing\Manager): Always use distributed cache and use PHP serialize 2025-02-06 07:52:04 +00:00
Teams fix(OpenAPI): Adjust array syntax to avoid ambiguities 2024-11-05 09:58:11 +01:00
Template refactor(provisioning_api): Rename AUserData to AUserDataOCSController to allow openapi-extractor to detect it as OCS 2025-01-06 14:30:40 +01:00
TextProcessing fix(textprocessing): accept scheduling a task if there are equivalent taskprocessing providers only 2024-11-13 16:59:46 +01:00
TextToImage fix: Prevent breaking change in IQueryBuilder 2024-10-17 18:31:44 +02:00
Translation chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Updater fix(OpenAPI): Adjust array syntax to avoid ambiguities 2024-11-05 09:58:11 +01:00
User fix: Fix a small typing problem is user manager 2025-01-14 17:21:40 +01:00
UserStatus chore: Add SPDX header 2024-05-24 13:11:22 +02:00
AllConfig.php fix(userconfig): Don't fail the precondition if the value is not set at all 2024-11-19 18:02:22 +01:00
AppConfig.php fix(config): drop value details 2025-01-27 17:55:29 +00:00
AppScriptDependency.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
AppScriptSort.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
BinaryFinder.php chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer 2024-10-19 07:57:35 +02:00
CapabilitiesManager.php feat(api): File conversion API 2025-01-15 16:38:18 -05:00
Color.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Config.php fix(config): Suppress error at install time 2024-09-27 17:28:14 -04:00
ContactsManager.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +02:00
DatabaseException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
DatabaseSetupException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
DateTimeFormatter.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +02:00
DateTimeZone.php chore: Use more gender neutral language 2024-10-14 13:59:24 +02:00
EmojiHelper.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
EventSource.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
EventSourceFactory.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
ForbiddenException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
HintException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Image.php fix(OCP): Fix Image interface 2024-09-02 14:57:17 +02:00
InitialStateService.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
Installer.php fix(appmanager): Fix tainted file path when loading appinfos 2024-10-14 14:33:19 +02:00
LargeFileHelper.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +02:00
Log.php fix(log): Fix log level handling 2025-01-27 10:23:28 +00:00
MemoryInfo.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
NaturalSort.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
NaturalSort_DefaultCollator.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
NavigationManager.php feat(Navigation): emit dedicated event for loading additional entries 2024-12-18 12:50:11 +01:00
NeedsUpdateException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
NotSquareException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
PhoneNumberUtil.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
PreviewManager.php fix(preview): Do not try to parse M3U files as MP3 2025-01-06 12:51:40 +02:00
PreviewNotAvailableException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
RedisFactory.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +02:00
Repair.php refactor: convert sanitize account properties repair step to background job 2025-02-24 15:23:20 +00:00
RepairException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Server.php fix: Correctly return app id and app version for core styles and images 2025-01-24 18:12:18 +00:00
ServerContainer.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
ServerNotAvailableException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
ServiceUnavailableException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Setup.php fix: Make user removal more resilient 2024-09-26 20:48:37 +02:00
Streamer.php fix(streamer): zip64 should work on 32-bit env now 2024-10-31 11:37:03 -04:00
StreamImage.php fix(OCP): Fix Image interface 2024-09-02 14:57:17 +02:00
SubAdmin.php chore(db): Correctly apply query types 2024-10-17 09:21:07 +02:00
SystemConfig.php add sse_c_key from S3 object storage properties config to list of sensitive values 2024-12-05 19:25:36 +01:00
TagManager.php refactor(tags): move favorite event dispatching to tags.php 2024-12-03 20:56:36 +01:00
Tags.php refactor(tags): move favorite event dispatching to tags.php 2024-12-03 20:56:36 +01:00
TemplateLayout.php fix(TemplateLayout): core is not an app but the server itself 2025-01-24 18:12:18 +00:00
TempManager.php refactor: migrate dirname to __DIR__ constants 2024-09-15 20:55:23 +02:00
Updater.php chore(legacy): Introduce public version ct plass and drop version methods from OC_Util 2024-09-20 14:53:34 +02:00
URLGenerator.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00