Uploaded image for project: 'Okapi'
  1. Okapi
  2. OKAPI-916

Match path and pathPattern using hash map

    XMLWordPrintable

Details

    • CP: sprint 100, CP: sprint 101
    • 3
    • Core: Platform

    Description

      Iterating over each RoutingEntry of a tenant takes long, we have more than 700 API paths, and can be avoided by using a hash map.

      For a path without wildcards use the path as key, for example

      /a/b/c
      

      For a path with a wildcard use the path until the last slash before the wildcard.
      Examples:
      /a/d/ is the key for

      /a/d/{id}
      /a/d/{id}/y
      /a/d/{id1}/y/{id2}
      

      /a/e/ is the key for

      /a/e/*
      

      /a/ is the key for

      /a/y*
      /a/zoo*
      

      For each tenant maintain a hash where each key points to a List<RoutingEntry>.

      If there is a request for the path /a/b/f/g try these keys:

      /a/b/f/g
      /a/b/f/
      /a/b/
      /a/
      /
      

      For n path segments there are only n+1 hash lookups.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                adam Adam Dickmeiss (Inactive)
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases