uPortal-Project/uPortal

Long searches break event aggregation

allanjackson opened this issue · 0 comments

Describe the bug
If a user pastes a lot of text into the search bar, it creates an event in the UP_RAW_EVENTS table with their search query. When the aggregation process runs, it is unable to fit this value into the search_term field of the UP_SEARCH_REQ_AGGR table, so it produces an error. At this point, none of the events in the raw events table can be cleared out, so the table just keeps growing to tens or hundreds of gigabytes of data.

To Reproduce
Steps to reproduce the behavior:

  1. Load the portal
  2. Enter more than 255 characters into the search bar. For example: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
  3. Watch the portal-events.log file for failed aggregation messages.
  4. Be sure to delete out the offending entry in the UP_RAW_EVENTS table, or your aggregation will never run again successfully.

Expected behavior
At some point, a search over 255 characters needs to be truncated before aggregation sticks it into the UP_SEARCH_REQ_AGGR table.

Stacktrace
Caused by: java.sql.BatchUpdateException: ORA-12899: value too large for column "UPORTAL"."UP_SEARCH_REQ_AGGR"."SEARCH_TERM" (actual: 334, maximum: 255)

Platform:

  • uPortal Version: 5.8.1