Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-8316

Update re2 to avoid lock contention

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 3.3.0
    • Backend
    • ghx-label-6

    Description

      I ran the following test query and found that it spent a lot of time in lock contention within the re2 library:

      ```select sum(l_linenumber) from item_20x where regexp_extract(l_shipinstruct, '.*E', 0) like '%E' ;```

      I think this lock contention would happen on any regex that involves backtracking. This was fixed in the re2 library upstream in https://github.com/google/re2/commit/eb00dfdd82015be22086cacc6bf830f72a10e2bc#diff-a60a8d25ed15adf68b94c85775fd3cf7

      We should consider upgrading re2 to the latest release, or if not that, at least cherry-picking this perf fix.

      Attachments

        Issue Links

          Activity

            People

              tlipcon Todd Lipcon
              tlipcon Todd Lipcon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: