France-ioi / AlgoreaBackend

Backend for the new Algorea platform
MIT License
1 stars 2 forks source link

Make sure propagation tables are cleant up #1046

Open smadbe opened 5 months ago

smadbe commented 5 months ago

Motivations

items_propagate and groups_propagate seems to grow forever with all items marked as "done".

As "done" is equivalent to no entry, I think it would better to have "no entry" (otherwise it would be better implemented as side attribute of the items/groups table directly).

Note: I think we already discussed (maybe it was with Dmitry) that it would be cleaner to delete the row directly instead of this "unnormalized" done state but I remember it was better for perf/code to update all rows to their next state instead of doing a separate DELETE query in each propagation loop. I don't know if this justification is still valid.

Subtasks