Skip to content

fix: don't rely on constraint for filecache_extended "upsert" when in transaction - #62587

Merged
susnux merged 1 commit into
masterfrom
filecache-extension-insert-transaction
Sep 3, 2026
Merged

fix: don't rely on constraint for filecache_extended "upsert" when in transaction#62587
susnux merged 1 commit into
masterfrom
filecache-extension-insert-transaction

Conversation

@icewind1991

@icewind1991 icewind1991 commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

Postgresql aborts the transaction on the constraint violation, so instead we need to manually check if we need to do an update or insert when in a transaction.

In the long term we really need a proper "upsert" or "insert ignore" in the query builder to make use of the various tools that databases offer for this

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@icewind1991 icewind1991 added this to the Nextcloud 35 milestone Jul 27, 2026
@icewind1991
icewind1991 requested a review from a team as a code owner July 27, 2026 15:25
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jul 27, 2026
@icewind1991
icewind1991 requested review from Altahrim, come-nc, provokateurin and salmart-dev and removed request for a team July 27, 2026 15:25
@icewind1991
icewind1991 force-pushed the filecache-extension-insert-transaction branch 2 times, most recently from 38f987e to 51e734d Compare July 28, 2026 11:56
This was referenced Aug 12, 2026
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 20, 2026
@skjnldsv skjnldsv mentioned this pull request Aug 25, 2026
… transaction

Signed-off-by: Robin Appelman <robin@icewind.nl>
@susnux
susnux force-pushed the filecache-extension-insert-transaction branch from 51e734d to 4eeb77b Compare September 2, 2026 10:43
@susnux

susnux commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

/backport to stable35

@susnux

susnux commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

/backport to stable34

@susnux

susnux commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

/backport to stable33

@susnux

susnux commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants