Skip to content

fix(gc): clean up tracking entities after operation completes (backport #1709) - #1716

Merged
andrewazores merged 2 commits into
cryostat-v4.2from
mergify/bp/cryostat-v4.2/pr-1709
Jul 29, 2026
Merged

fix(gc): clean up tracking entities after operation completes (backport #1709)#1716
andrewazores merged 2 commits into
cryostat-v4.2from
mergify/bp/cryostat-v4.2/pr-1709

Conversation

@mergify

@mergify mergify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Fixes: #1708

Description of the change:

Ensures that the GarbageCollection entity is deleted after a gc request completes. This entity is only intended to track gc invocations for the audit log - the entity doesn't encode any information or even carry any specific metadata than the universal audit log metadata (timestamp, link to target ID, name of requesting client/user). Prior to this change both the primary GarbageCollection table and its GarbageCollection_AUD audit log would gain/retain a new row each time a GC request was serviced. The primary table should generally be empty in this case and only the audit log should retain a historical log.
This also adds an event listener to catch target loss and ensure that no dangling ThreadDump, HeapDump, or AsyncProfilerRecording tracking entities are left behind. These already do normally have a deletion in their lifecycle, but if the associated target is unexpectedly lost while an operation is underway then the tracking entities could be left behind stale forever.


This is an automatic backport of pull request #1709 done by [Mergify](https://mergify.com).

@andrewazores
andrewazores force-pushed the mergify/bp/cryostat-v4.2/pr-1709 branch from a5be186 to ff817fb Compare July 27, 2026 19:04
@andrewazores

Copy link
Copy Markdown
Member

/build_test

@github-actions

Copy link
Copy Markdown

Workflow started at 7/27/2026, 3:05:36 PM. View Actions Run.

@github-actions

Copy link
Copy Markdown

No OpenAPI schema changes detected.

GraphQL schema change detected:

diff --git a/schema/schema.graphql b/schema/schema.graphql
index 663e793..d1d9731 100644
--- a/schema/schema.graphql
+++ b/schema/schema.graphql
@@ -374,20 +374,22 @@ input ArchivedRecordingsFilterInput {
   archivedTimeBeforeEqual: BigInteger
   labels: [String]
   name: String
   names: [String]
   sizeBytesGreaterThanEqual: BigInteger
   sizeBytesLessThanEqual: BigInteger
   sourceTarget: String
 }
 
 input DiscoveryNodeFilterInput {
+  alias: String
+  aliases: [String]
   annotations: [String]
   id: BigInteger
   ids: [BigInteger]
   jvmId: String
   jvmIds: [String]
   labels: [String]
   name: String
   names: [String]
   nodeTypes: [String]
   targetId: BigInteger

No WebSocket notifications schema changes detected.

@andrewazores

Copy link
Copy Markdown
Member

/build_test

@github-actions

Copy link
Copy Markdown

Workflow started at 7/27/2026, 3:20:31 PM. View Actions Run.

@github-actions

Copy link
Copy Markdown

No OpenAPI schema changes detected.

No GraphQL schema changes detected.

No WebSocket notifications schema changes detected.

@mergify

mergify Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@andrewazores
andrewazores merged commit 0771f2c into cryostat-v4.2 Jul 29, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants