Skip to content

[Bug] locallyAcquiredLocks leak in OwnershipCache #18196

Closed

Description

@leizhiyuan

Search before asking

  • I searched in the issues and found nothing similar.

Version

master

Minimal reproduce step

review the code

image

34M

What did you expect to see?

    public CompletableFuture<Void> removeOwnership(NamespaceBundle bundle) {
        ResourceLock<NamespaceEphemeralData> lock = locallyAcquiredLocks.get(bundle);
        if (lock == null) {
            // We don't own the specified bundle anymore
            return CompletableFuture.completedFuture(null);
        }

        return lock.release();
    }

should be locallyAcquiredLocks.remove(bundle)

What did you see instead?

leak

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. added
    type/bug
    on Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions