Project

General

Profile

Actions

Bug #34093

closed

Authorizer cache loads all permitted resources to memory

Added by Tomer Brisker about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

The cache saves calculating the scope for the collection, but loads all records when calling `.include?` instead of checking for the existence of the specific record within the scope

  def collection_cache_lookup(subject, permission)
    collection = @cache[subject.class.to_s][permission] ||=
      find_collection(subject.class, :permission => permission)

    collection.include?(subject)
  end


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #33585: Puma memory usage after update to 2.5ClosedActions
Actions #1

Updated by Tomer Brisker about 2 years ago

  • Description updated (diff)
Actions #2

Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8972 added
Actions #3

Updated by The Foreman Bot about 2 years ago

  • Fixed in Releases 3.2.0 added
Actions #4

Updated by Tomer Brisker about 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Tomer Brisker about 2 years ago

  • Fixed in Releases 3.1.0 added
  • Fixed in Releases deleted (3.2.0)
Actions #6

Updated by Lukas Zapletal about 2 years ago

  • Related to Bug #33585: Puma memory usage after update to 2.5 added
Actions

Also available in: Atom PDF