Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete all pruned persisted info records #39219

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Commits on Feb 27, 2024

  1. Delete all pruned persisted info records

    We prune persisted info records if they meet any of the following
    criteria:
    
    ```clojure
    (or (contains? (persisted-info/prunable-states) current-state)
        (:archived card-info)
        (not (:dataset card-info)))
    ```
    
    But we only deleted the record when:
    
    ```clojure
    (when (= "deletable" current-state)
      (t2/delete! PersistedInfo :id (:id persisted-info)))
    ```
    
    So any records that were in a "creating" state (persist a model, but
    before it first gets persisted, make it not a model, or archive the
    underlying model), we constantly pruned them but never removed the
    persisted info record.
    
    Leading to task results like:
    
    ```javascript
    {"success": 21, "error": 0, "skipped": 0}
    ```
    
    Because 21 things were queued up for pruning, were attempted to be
    pruned, but the persisted info record never removed.
    dpsutton committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    b580021 View commit details
    Browse the repository at this point in the history