Uploaded image for project: 'OCMUI - OpenShift Cluster Manager UI'
  1. OCMUI - OpenShift Cluster Manager UI
  2. OCMUI-2067

[OCM UI] cluster details: history filter "logged by/description" leads back-end to be unresponsive

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • A-Team
    • False
    • Hide

      None

      Show
      None
    • False
    • ACM Console Sprint 258

      Description of problem:

      In cluster details, tab "Cluster history", the application of the filter "Logged by" is related to a back end call which is usually quite slow. In addition to this, after a few consecutive filter applications in a short period of time, the back-end "cluster_logs" service starts to send error 504 even to other kind of calls and for a period of time related to the number of "Logged by" related calls done.

      The cause of this problem is the "Logged by" query type, which is actually quite heavy, in fact the search part is like this: 

      (username ILIKE '%my_logged_user%' OR (username='' AND created_by ILIKE '%my_logged_user%'))
      

      It could be better changing the logic of the filter moving to an exact search, i mean search for exactly the username typed by the user in the filter input field. Another solution could be asking back-end for all cluster logs entries and filtering them directly in the browser. Anyway the above ones are just personal proposals, feel free to ignore them.

      A similar issue happens also when filtering by description, especially if the filter text is not contained in any cluster log. The complexity of the query for description is quite similar to the one for 'logged by'.

      How reproducible:

      always (applying the filter for enough times)

      Steps to Reproduce:

      1. Open OCM UI staging.
      2. Open ROSA/OSD/OCP cluster
      3. Go to "Cluster history" tab
      4. Apply the filter "Logged by"
      5. Repeat the filter application for a while, until you notice errors or unresponsiveness
      6. Try also other kind of filters

      Actual results:

      At step 5, you should notice that history table shows the waiting spinner for a long time and then an error message is shown. The called back-end endpoint returned 504.

      At step 6 chances are that other filter applications ("description" or other) show the same behavior.

      Expected results:

      The application of the filter should work smoothly.

        1. Screenshot 2024-08-22 at 11.46.53 AM.png
          Screenshot 2024-08-22 at 11.46.53 AM.png
          754 kB
        2. logsFilters.mp4
          53.16 MB
        3. logged_by.webm
          2.17 MB
        4. history_logged_by.png
          history_logged_by.png
          88 kB

            rh-ee-dcooper Dylan Cooper
            rhn-support-vgrazian Vitor Graziano (Inactive)
            LAKSHMI SHIVANTHI AMARACHINTHA LAKSHMI SHIVANTHI AMARACHINTHA
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: