This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Opened 2 years ago

Last modified 2 years ago

#1374 assigned defect

Dashboard linked_events cached per user

Reported by: aavilesd Owned by: ferhatelmas
Priority: normal Milestone: v2.1
Component: General Version: 1.1
Keywords: Cc:

Description

At the moment, dashboard linked_events are cached per logged user:

Taking into account that Redis cache is refreshed after some time (10 minutes by default), this approach for caching will cause the dashboard to display different information depending on the logged user meanwhile.

Normally, the dashboard will be visited by its user, but an administrator might want to check it. This behavior feels buggy and could lead admins to think of some inconsistency going on in the DB.

To reproduce the issue:

  • UserA checks his Dashboard with events on it. This creates a linked_events(UserA) object and caches it for UserA, if it doesn't exist.
  • UserA creates a new-conference. This change won't be reflected in his dashboard until cache expires.
  • Admin access UserA's dashboard. Because Admin doesn't have a cached linked_events(UserA) object, it is then generated with the latest information and cached for Admin.

At this point:

  • UserA's dashboard logged as UserA doesn't display new-conference.
  • UserA's dashboard logged as Admin displays new-conference.

After UserA's linked_events cache expiration they both will display the same information.

To follow-up:
In indico/web/http_api/handlers.py @ def handler(req, **params) you will found out that cacheKey is different depending on the logged user, and therefore, the actual exporting hook(aw, req) happens or not.

Examples of cacheKey of linked_events from same user depending on logged user:

  • user-0_/export/user/linked_events?from=-7d&limit=10&order=start&tz=UTC&userid=0
  • user-1_/export/user/linked_events?from=-7d&limit=10&order=start&tz=UTC&userid=0

Change History (1)

comment:1 Changed 2 years ago by ferhatelmas

  • Owner set to ferhatelmas
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.