Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-2638

Refactor runtime validation of catalogs

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDB 4.2.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      2

      Description

      PDB-2620 was created because report validation was significantly slowing down command processing. Catalogs were not found to be a bottleneck while profiling the scale testing server, but looking at the code, it looks like it should have a similar problem. The reports code validates all resource up front when pulling the message off of the queue. Catalogs only validates the metadata. The resources/edges are then validated several times (depending on the code path).

      We should refactor this catalog code such that it gets validated up front, but doesn't get re-validated on every storage function. The easiest way to do this is ensure the validation happens in command.clj, then disable runtime validation by switching from our defn-validated to the regular schema defn macro.

        Attachments

          Activity

            People

            Assignee:
            molly.waggett Molly Waggett
            Reporter:
            ryan.senior Ryan Senior
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support