Skip to content

fix(database): add index for wopi expiry column#5745

Merged
juliusknorr merged 1 commit into
mainfrom
feat/index-wopi-expiry-column
Jun 9, 2026
Merged

fix(database): add index for wopi expiry column#5745
juliusknorr merged 1 commit into
mainfrom
feat/index-wopi-expiry-column

Conversation

@elzody

@elzody elzody commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Because the cleanup background job now deletes all expired WOPI tokens in a single query instead of batching them, it makes sense to introduce an index on the expiry column of the oc_richdocuments_wopi table. This PR introduces a change to the existing database migration that creates the table (adding an index at creation time) as well as a new AddMissingIndices event listener that creates the index when running occ db:add-missing-indices.

I tested everything manually and it works flawlessy. I was not sure how to implement automated testing for this.

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
@elzody elzody self-assigned this Jun 9, 2026
@elzody elzody requested a review from juliusknorr as a code owner June 9, 2026 19:15
@elzody elzody added the 3. to review Ready to be reviewed label Jun 9, 2026
@elzody

elzody commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable34 please

@elzody

elzody commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable33 please

@elzody

elzody commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable32 please

@elzody

elzody commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable31 please

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

Labels

3. to review Ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Index the expiry column of oc_richdocuments_wopi

2 participants