OpenSlides / OpenSlides/openslides-backend

[relDB] Finish work on extended_database

Open
#3,306 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

clean up enhancement needs investigation
Dominant language
Python
Stars
9
Forks
40
Avg merge
1d 22h
Merged PRs (30d)
19

Description

There are still sone TODOs left in the extended database. Since they are mostly 7 months old, there'll need to be some investigation on which still apply. Here's a list:

Improvements to security:

  • The changed_model_copy in get function should be created via deep_copy
  • use the self.is_new in more places.

Improvements:

  • Later in filter method there is a TODO questioning whether the update part of the "update db models and calculate exact matching"-loop is necessary

Performance:

  • There is a performance TODO relatively early in the filter function, details see in code

Misc:

  • It should be investigated if it is necessary to always include the id in the mapped_fields of the changed_model_copy of the get function
  • in model_fails_filter method: "meta_new" should possibly be assumed to be the default if the model is not in the database

All of the above:

  • Improve and cleanup the write method

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the extended_database implementation and reviewing the existing TODOs in get, filter, model_fails_filter, and write. Investigate which seven-month-old items still apply, then resolve the applicable security, performance, behavior, and cleanup questions and verify the resulting database behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.