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:
- Open OCM UI staging.
- Open ROSA/OSD/OCP cluster
- Go to "Cluster history" tab
- Apply the filter "Logged by"
- Repeat the filter application for a while, until you notice errors or unresponsiveness
- 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.
- is related to
-
OCMUI-2109 [OCM UI][UX] cluster history: unexpected dates filter applied in a few scenarios
- Closed
- relates to
-
OCMUI-1306 [OCM UI QE] Create test case automation for day2 cluster history operations for ROSA classic cluster.
- To Do