aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/FileEntry/FileEntryCheckbox.vue
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2025-02-18 15:49:36 +0100
committerLouis <louis@chmn.me>2025-02-19 12:25:12 +0100
commit066c92f7b0966775fdbab79255bffee2ae9328ab (patch)
tree03ee9868946cb94d2c962b96fefc54cb432b46f3 /apps/files/src/components/FileEntry/FileEntryCheckbox.vue
parentff86bacaad7ee9ae5374554df261ab999d5a3496 (diff)
downloadnextcloud-server-066c92f7b0966775fdbab79255bffee2ae9328ab.tar.gz
nextcloud-server-066c92f7b0966775fdbab79255bffee2ae9328ab.zip
fix: Initialize lastConnectionCheck after first connectionartonge/fix/login_flow_v2_sessions
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()];` https://github.com/nextcloud/server/blob/60711ea4cfde6f53d0b18bcd7e166a34a43056a5/lib/private/DB/Connection.php#L215-L221 https://github.com/nextcloud/server/blob/60711ea4cfde6f53d0b18bcd7e166a34a43056a5/lib/private/DB/Connection.php#L891-L893 https://github.com/nextcloud/3rdparty/blob/2b6d7bf65ff242ea050e736925f752a38d8da220/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php#L136-L139 Then, if the connection name ends up as being 'primary', the reconnect logic is skipped: https://github.com/nextcloud/server/blob/60711ea4cfde6f53d0b18bcd7e166a34a43056a5/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>
Diffstat (limited to 'apps/files/src/components/FileEntry/FileEntryCheckbox.vue')
0 files changed, 0 insertions, 0 deletions