You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We ended up overloading the database when rolling out document retention. I have included some possible fixes in this PR. They are twofold:
1. Increasing time in between batches to 10 minutes. Since pushes happen quite fast, it makes more sense to have instances query the database way less frequently.
2. Increase the jitter so all databases aren't hitting the database at the same time.
3. Update the indexes used on the query. I used the wrong index, which was `primary` instead of the `by_table_and_document_id` index on the documents table, so I updated to use the correct one. I didn't catch this when I ran `explain analyze`, but this should be way better.
Let me know if you have any other suggestions. It would also be nice if we could somehow push this out more slowly so that we can monitor better as the push is going on.
GitOrigin-RevId: 193bef96d3ec528d588bbf56cbbaca4e03bcb7d2
0 commit comments