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

Javascripts loading in a loop with datasets in “in review” status #11264

Closed
gwendoux opened this issue Feb 14, 2025 · 3 comments · Fixed by #11269
Closed

Javascripts loading in a loop with datasets in “in review” status #11264

gwendoux opened this issue Feb 14, 2025 · 3 comments · Fixed by #11269
Labels
Type: Bug a defect

Comments

@gwendoux
Copy link
Contributor

What steps does it take to reproduce the issue?

  1. create a new dataset with only Contributor permissions
  2. Submit for review the dataset

ex: https://demo.dataverse.org/dataset.xhtml?persistentId=doi%3A10.70122%2FFK2%2FGHTWC0&version=DRAFT

  • When does this issue occur?

This issue occurs with "in review" datasets on Dataverse installation with external vocabularies enabled.

Everything returns to normal once the dataset is published or returned to the author

  • Which page(s) does it occurs on?

Dataset view

  • What happens?

  • To whom does it occur (all users, curators, superusers)?

All users

  • What did you expect to happen?

Which version of Dataverse are you using?

tested with v6.2 and v6.5

Any related open or closed issues to this bug report?

Screenshots:

Image

Are you thinking about creating a pull request for this issue?

@gwendoux gwendoux added the Type: Bug a defect label Feb 14, 2025
@qqmyers
Copy link
Member

qqmyers commented Feb 14, 2025

Thanks for the report. FWIW: This is a result of a combination of the page refreshing to see if the In Review lock has been removed and a cautious/blind script reload strategy. (Your screenshot doesn't show it but there should be repetitive POST calls to dataset.xhtml happening as well.) Despite the fact that datasets stay In Review for a relatively long time, we treat the In Review lock the same way as we do for normally short-lived ones like Ingest or Publication locks - by refreshing the page every few seconds to see if the lock is gone. Whenever the page is refreshed, the scripts are reloaded/rerun to assure the display is correct (in case the partial page reload covers a part the scripts affect - metadata fields, search facets, the summary section, etc.). In general, we want the scripts to reload for that reason, but with In Review locks, I don't think the parts of the page where the scripts run get reloaded.

One useful option for In Review locks (and perhaps even other lock types like Ingest with large files or publish with many large files where the lock may stay for an hour+) would be to slow down how often the check for the lock is made, and/or do a check that doesn't involve updating parts of the page.

W.r.t. the ext. vocab scripts in particular - there might be a way to check to see if relevant parts of the page are affected before requesting that they get reloaded, versus sending them for any reload.

In terms of overall effect, the extra reloading should be minor in that the scripts should be cached by the browser, and, if there's no new field written into the page that they would affect, they do a quick check and stop.

My guess is that we probably won't want to fix this in the current UI but will aim for a different approach in the SPA. If anyone is interested in making changes now, I'd suggest making the page refresh slow down as the lock remains for a longer period. (That would probably be simple and be a general performance boost/reduce load on the server, whereas trying to only load the scripts when needed may be trickier and probably wouldn't affect performance much.)

@gwendoux
Copy link
Contributor Author

Thanks for the explanation, it's much clearer now.

Of course it's not a priority, I just noticed it by chance while working on external vocabulary. The page stayed open for a while and the memory used by Firefox was swollen and the PC's fans were spinning (or maybe it was just Windows).

@qqmyers
Copy link
Member

qqmyers commented Feb 17, 2025

FYI - since QDR uses 'In Review' I went ahead and added an exponential backoff to the refresh in #11269. I picked a 5 second start time that backs off to 8, 11.6, ~16 seconds, ... off to a 5 minute max refresh time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug a defect
Projects
None yet
2 participants