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

Hotfix 3702 perf issues round 2 #3737

Merged
merged 27 commits into from
Jun 14, 2021
Merged

Conversation

fnocetti
Copy link
Contributor

fixes #3702

This replaces #3736

PR checklist:

  • Update READ.me ?
  • Update API documentation ?

QA checklist:

  • Smoke test the functionality described in the issue
  • Test for side effects
  • UI responsiveness
  • Cross browser testing
  • Code review

@fnocetti fnocetti marked this pull request as ready for review June 11, 2021 16:30
@RafaPolit
Copy link
Member

RafaPolit commented Jun 11, 2021

I cannot edit a thesaurus item on previously existing data (perhaps due to certain scenario?). This was not happening yesterday.

To Reproduce

  • Restore data from collection "best-artworks"
  • Migrate & reindex
  • Try to edit a value inside Thesaurus "Genre" (I have tried with a few, all give an error, but the first one is a good try)

Error:

TypeError: Cannot read property 'toString' of undefined
    at /home/rafapolit/workspace/uwazi/app/api/entities/entities.js:766:43
    at Array.filter (<anonymous>)
    at Object.renameThesaurusInMetadata (/home/rafapolit/workspace/uwazi/app/api/entities/entities.js:766:5)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)
    at async updateOptionsInEntities (/home/rafapolit/workspace/uwazi/app/api/thesauri/thesauri.js:80:3)
    at async update (/home/rafapolit/workspace/uwazi/app/api/thesauri/thesauri.js:94:5)
    at async /home/rafapolit/workspace/uwazi/app/api/thesauri/routes.js:47:22

Note: If I create a NEW thesaurus, NEW template, and assign the thesaurus, and then edit it, it works. It could be an issue of collections with existing data, it could be due to the size of the thesaurus, the amount of entities, it could be the fact that the entities have multiple selects... many other variables. Please, use the dataset described to diagnose and debug.

@RafaPolit
Copy link
Member

Other tests are successful, but I am very limited in what I can try without the ability to edit thesauri.

@daneryl
Copy link
Collaborator

daneryl commented Jun 12, 2021

@RafaPolit @fnocetti

I cannot edit a thesaurus item on previously existing data (perhaps due to certain scenario?). This was not happening yesterday.

this is fixed, we were forced to remove p.content?.toString() because we do not have support in master yet. this was the cause. i have added a small test and a manual check of p.content.

@daneryl daneryl merged commit 1ec0758 into master Jun 14, 2021
@daneryl daneryl deleted the HOTFIX-3702-perf-issues-round-2 branch June 14, 2021 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants