Skip to content

QuarkusKeycloakSession not garbage collected when running Liquibase #43759

@ahus1

Description

@ahus1

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

dist/quarkus

Describe the bug

When Keycloak performs the Liquibase upgrade, it misses to clear a thread local context, so the session is never garbage collected.

As this is an effort to find all those places, this is a housekeeping task. It will reduce the memory usage of Keycloak slightly in this place, and to a larger extent in other places.

Version

main

Regression

  • The issue is a regression

Expected behavior

Thread locals should be removed when no longer used.

Actual behavior

The thread local is kept

How to Reproduce?

Start up Keycloak, create a memory dump, and search for QuarkusKeycloakSession

Anything else?

I'll create a PR.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions