Uploaded image for project: 'Periscope'
  1. Periscope
  2. MGNLPER-65

QuerySnifferProcessor always invokes operations against the first session ever logged in to the system

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.0
    • None
    • Basel 160
    • 1

      way to reproduce:

      • start instance
      • invoke open pages app command via findbar -> opens the pages app
      • restart the session (e.g. via ?restartApplication)
      • invoke the same operation in the new session -> BOOM, pages app fails to start with obscure IoC related issues

      problem is that QuerySnifferProcessor caches the instances of the operations once and for all (in consider method). When the ops are created - they inject e.g. location controller inside. This means that every time the op is triggered - it'll use the same instance of a location controller. Not only it leaks in memory with the rest of the UI session stuff, but also renders the sniffer commands disfunctional.

      I am not entirely sure that caching those commands is such a necessary thing in the first place, but as a simple solution I propose to cache the factories of query sniffers, i.e. storing the Collection<Supplier<QuerySniffer>> instead of Collection<QuerySniffer>.

        Acceptance criteria

              apchelintcev Aleksandr Pchelintcev
              apchelintcev Aleksandr Pchelintcev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoR