LearningLocker / learninglocker

Learning Locker - The Open Source Learning Record Store. Started in 2014.
https://learningpool.com/solutions/learning-record-store-learning-locker/learning-locker-community-overview/
GNU General Public License v3.0
555 stars 276 forks source link

Extract personas performance issue #1634

Open Dantemss opened 8 months ago

Dantemss commented 8 months ago

What version were you using?

v7.1.1 (open source) - it doesn't seem to allow me to change the issue label

What steps can we follow to reproduce the behaviour?

Have a Learning Locker instance with several million statements (using DocumentDB in my case).

What is the actual behaviour?

The following query shows up in DocumentDB performance insights as taking nearly 100% of the database IO for a few hours at a time, causing responsiveness issues:

Screenshot 2024-03-15 at 10 46 00 AM

It then disappears for several hours. Reading the worker code, it doesn't seem like it intends to update a lot of statements at once, since updates are only supposed to happen when personas are created for the first time, so I'm not entirely sure why this situation is happening.

What is the expected behavior?

If I understand right, personas should only be created when the first few statements are received for each user, so these mass updates shouldn't happen.

Is there any additional information that will help us replicate/understand the problem?

Let me know if there's more information that I can provide.