Skip to content

[stable27] fix(dav): Limit number of UPDATES for sync token created_at - #45989

Merged
AndyScherzinger merged 1 commit into
stable27from
backport/45968/stable27
Jun 20, 2024
Merged

[stable27] fix(dav): Limit number of UPDATES for sync token created_at#45989
AndyScherzinger merged 1 commit into
stable27from
backport/45968/stable27

Conversation

@backportbot

Copy link
Copy Markdown

Backport of PR #45968

Address book and calendar sync tokens have a created_at column in 26+
and we need to assign a current timestamp to the existing data at
upgrade so the data isn't cleaned up immediately. Updating the full
table is expensive and fails on clustered setups that limit transaction
size. We don't need a timestamp for the oldest rows so we can skip
updating them.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
->setFirstResult($limit)
->setMaxResults(1);
$oldestIdResult = $thresholdSelect->executeQuery();
$oldestId = $oldestIdResult->fetchColumn();

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OCP\DB\IResult::fetchColumn has been marked as deprecated
@AndyScherzinger
AndyScherzinger merged commit 3a1b738 into stable27Jun 20, 2024
@AndyScherzinger
AndyScherzinger deleted the backport/45968/stable27 branch June 20, 2024 11:41
@skjnldsvskjnldsv mentioned this pull request Jun 20, 2024
4 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugfeature: caldavRelated to CalDAV internalsfeature: carddavRelated to CardDAV internalsfeature: davfeature: install and update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@AndyScherzinger@ChristophWurst@github-advanced-security