nextcloud/lib/private
Louis Chemineau d3b4b21e29 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-07 12:41:49 +01:00
Activity fix(activity): regroup Files and spltit sharing activity 2024-08-01 11:03:24 +02:00
App fix(TemplateLayout): core is not an app but the server itself 2025-01-29 08:37:33 +01:00
AppFramework fix(Http): Only allow valid HTTP status code values via template 2025-01-08 10:14:12 +00:00
Archive chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Authentication fix: Handle exception when clearing previously removed two factor tokens 2024-11-05 10:50:29 +00:00
Avatar fix: use different file name for generated dark avatars 2024-05-26 17:32:10 +02:00
BackgroundJob fix(cron): Keep job class limitation when searching for the next job 2025-02-19 09:27:50 +00:00
Blurhash/Listener fix(performance): use low resolution for blurhash 2025-01-29 10:44:00 +00:00
Broadcast/Events chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Cache Merge branch 'master' into refactor/OC-Server-getSecureRandom 2024-05-30 14:24:22 +02:00
Calendar feat(dav): Add an API for upcoming events 2024-08-13 20:03:31 +02:00
Collaboration feat(Reference): Add public API endpoints to get references 2024-07-17 12:56:41 +02:00
Command chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Comments fix(comments): Document supported types and provide psalm typing 2024-10-18 06:21:01 +00:00
Console fix(command): Make method compatible with upstream class (requires 3rdparty bump) 2024-10-21 11:28:52 +02:00
Contacts/ContactsMenu chore: Add SPDX header 2024-05-24 13:11:22 +02: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: Add SPDX header 2024-05-24 13:11:22 +02:00
Encryption Merge branch 'master' into refactor/OC-Server-getEncryptionFilesHelper 2024-06-04 15:47:48 +02:00
EventDispatcher chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Federation fix(federation): Fix missing protocol on CloudID remote 2024-06-27 11:26:08 +02:00
Files Merge pull request #50796 from nextcloud/backport/50781/stable30 2025-02-17 19:15:58 +01:00
FilesMetadata test: add some minimal testing for metadata storage 2024-12-05 10:35:24 +01:00
FullTextSearch chore: Add SPDX header 2024-05-24 13:11:22 +02:00
GlobalScale chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Group fix: Ensure database connection is setup when getting group details 2024-08-06 13:41:04 +02:00
Hooks chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Http fix: remove superflous line 2024-11-14 10:45:23 +00:00
IntegrityCheck fix: skip the integrity check for nextcloud-init-sync.lock 2024-09-23 15:51:42 +00:00
KnownUser chore: Add SPDX header 2024-05-24 13:11:22 +02:00
L10N feat: reduce available languages per config value "reduce_to_languages" 2024-07-01 09:34:11 +02:00
LDAP chore: Add SPDX header 2024-05-24 13:11:22 +02:00
legacy fix(OC_Files): Fix error response when event was not set 2025-01-31 19:17:22 +01:00
Lock fix(locking): Accept mixed as value on setTTL 2024-10-30 09:31:59 +01:00
Lockdown refactor(Token): introduce scope constants 2024-06-05 19:01:14 +02:00
Log fix(logger): Remove more parameters of other methods 2024-10-21 16:52:48 +00:00
Mail fix(Mailer): Fix sendmail binary fallback 2025-02-12 13:23:11 +01:00
Memcache fix: misc code fixes around db sharding 2024-09-16 12:19:20 +02:00
Migration fix(migration-preview): display a message if no attributes set 2024-08-06 22:23:12 -01:00
Net fix(net): Add IPv6 zone handling to IpAddressClassifier 2024-11-06 08:19:56 +00:00
Notification chore: Add SPDX header 2024-05-24 13:11:22 +02:00
OCM fix: make sure we have a valid scheme when testing ocm urls 2024-12-17 15:23:59 +01:00
OCS chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Preview fix(preview): Filter for folders in cleanup old preview job 2025-01-27 15:09:36 +00:00
Profile fix(FediverseAction): Ensure valid fediverse links are generated 2025-02-07 12:41:49 +01:00
Profiler chore: Add SPDX header 2024-05-24 13:11:22 +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 16:44:49 +01:00
RichObjectStrings chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Route fix(files): properly forward open params from short urls 2025-02-19 10:13:55 +01:00
Search chore: Remove deprecated legacy search backend 2024-08-01 12:33:18 +02:00
Security fix(migration): Decrypt ownCloud secrets v2 2024-11-28 09:43:47 +01:00
Session fix(setup): ignore long session login during installation 2024-08-27 19:14:03 +00:00
Settings chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Setup Merge branch 'master' into refactor/OC-Server-getSecureRandom 2024-05-30 14:24:22 +02:00
SetupCheck chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Share chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Share20 fix(sharing): Move permission validation to share manager 2025-01-31 18:21:26 +01:00
SpeechToText fix(SpeechToTextManager): Throw TaskProcessing Task failed 2024-08-30 14:06:15 +02:00
Support chore: Add SPDX header 2024-05-24 13:11:22 +02:00
SystemTag fix: Trim tags on adding or editing 2025-01-23 00:10:10 +00:00
Tagging chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Talk chore: Add SPDX header 2024-05-24 13:11:22 +02:00
TaskProcessing fix(TaskProcessing\Manager): Always use distributed cache and use PHP serialize 2025-02-13 16:44:10 +01:00
Teams fix: Avoid throwing errors for teams are unavailable 2024-06-24 12:29:43 +02:00
Template feat: Provide CSP nonce as <meta> element 2024-08-13 10:32:44 +02:00
TextProcessing fix(BackgroundJobs): Adjust intervals and time sensitivities 2024-11-25 08:38:58 +01:00
TextToImage fix(BackgroundJobs): Adjust intervals and time sensitivities 2024-11-25 08:38:58 +01:00
Translation chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Updater feat(migration-attributes): tests 2024-07-29 12:44:52 -01:00
User fix(BackgroundJobs): Adjust intervals and time sensitivities 2024-11-25 08:38:58 +01:00
UserStatus chore: Add SPDX header 2024-05-24 13:11:22 +02:00
AllConfig.php fix(config): Throw PreconditionException always when it didn't match 2024-09-13 11:40:13 +00:00
AppConfig.php fix(config): Mark more configs as sensitive 2024-10-28 15:28:52 +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: Add SPDX header 2024-05-24 13:11:22 +02:00
CapabilitiesManager.php perf(capabilities): Log capabilities providers that are slow 2024-06-21 11:41:22 +02: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-10-01 16:24:11 +00:00
ContactsManager.php chore: Add SPDX header 2024-05-24 13:11:22 +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 chore: Add SPDX header 2024-05-24 13:11:22 +02:00
DateTimeZone.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
EmojiHelper.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
EventSource.php chore: Add SPDX header 2024-05-24 13:11:22 +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
InitialStateService.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Installer.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
LargeFileHelper.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Log.php fix(log): Fix log level handling 2025-01-27 10:22:20 +00:00
MemoryInfo.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
NaturalSort.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
NaturalSort_DefaultCollator.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
NavigationManager.php fix(NavigationManager): Make entry order always an integer 2024-05-30 17:00:32 +02: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-07 19:07:19 +00:00
PreviewNotAvailableException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
RedisFactory.php feat: add config flag to toggle persistent redis connections 2024-07-22 14:25:20 +02:00
Repair.php refactor: convert sanitize account properties repair step to background job 2025-02-24 16:44:49 +01:00
RepairException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Server.php fix(TemplateLayout): core is not an app but the server itself 2025-01-29 08:37:33 +01: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-10-08 21:02:07 +02:00
Streamer.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
StreamImage.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
SubAdmin.php fix: Subadmin can access self 2024-10-09 14:52:11 -07:00
SystemConfig.php fix: add sse_c_key from S3 object storage properties config to list of sensitive values 2025-01-22 09:09:24 -05:00
TagManager.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Tags.php fix(Tags): Return boolean for userHasTags() 2024-09-15 15:52:40 +00:00
TemplateLayout.php fix(TemplateLayout): core is not an app but the server itself 2025-01-29 08:37:33 +01:00
TempManager.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Updater.php fix(SetupCheck): Properly check public access to data directory 2024-08-08 22:08:42 +02:00
URLGenerator.php fix(setup-checks): Ensure URL with webroot works 2024-09-15 21:40:27 +02:00