Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't overfill the prevnext cache when reserving for a survey. #22011

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

jmcclelland
Copy link
Contributor

Overview

When reserving respondents for a survey, the civicrm_prevnext_cache table gets filled with all the contacts in the database rather then just the contacts returned by the search. This is barely noticeable on a small site or a site backed by a fast database. But on a big site or a slow database site it casuses a lot of churn and slowness.

Before

  1. Create a Survey
  2. Create a regular group with one person in it.
  3. Check that the civicrm_prevnext_cache table is empty (or empty it)
  4. Click to reserve respondents. Select your survey and group and click Search
  5. Check the contents of the civicrm_prevnext_cache and you see the same number as total contacts in the civicrm_contact table instead of just one contact.

After

You should only see one record in the civicrm_nextprev_cache table.

Technical Details

I think this has been broken for a long time and it makes me wonder if the nextprev_cache is even used in this context.

@civibot
Copy link

civibot bot commented Nov 8, 2021

(Standard links)

@civibot civibot bot added the master label Nov 8, 2021
@eileenmcnaughton
Copy link
Contributor

I feel like this functionality is not much used so I'm going with the low review bar of relying on your analysis & testing and just checking that your analysis is logical and the change looks sane - which it is & does. Merging

@eileenmcnaughton eileenmcnaughton merged commit a960eec into civicrm:master Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants