Skip to content

Refactor audit log database to API conversion which is inefficient #16718

@mafredri

Description

@mafredri

The current audit log endpoints perform additional database queries for each audit log row, at least to check if the resource has been deleted or not and to verify resources for creating a link to the resource (auditLogIsResourceDeleted, auditLogResourceLink). For workspace builds we do up to 4 separate queries as a result.

As Steven put it:

Do we really do these functions for every audit log row?!

Originally posted by @Emyrk in #16670 (review)

This is an inefficient way to do it, however, the query to handle all the different types of resources would also become quite complex. But it would be nice to have a better solution for this or at least minimize the number of queries we need to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy