« Previous | Next » 

Revision d20081ab

IDd20081abd3eb65ce1b7a7a926b2878cab1b287fc

Added by Sofia Papagiannaki almost 7 years ago

pithos: Reduce database interactions for access control.

Each frontend method calls several backend methods.
Each backend method checks whether the user has permission to access the
specific path.
This results to several identical queries to the database.
This commit introduces the following optimization:
We keep 2 dictionaries:
  • one for the allowed paths for read per user and
  • another for the allowed paths for write per user
    The lifespan of these dictionaries is a database transaction.
    The dictionaries are updated appropriately after each successful query for
    permissions and after actions that affect permissions
    (delete & update object permissions).
    Especially in the latter case the dictionaries are reset because it was
    estimated that this is less expensive than identifying the affected paths.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences