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

[wip] Fixing memory leaks #1170

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

akbashev
Copy link
Contributor

@akbashev akbashev commented Oct 24, 2024

RP to fix #1168

Comment on lines +32 to +36
public var events: ClusterEventStream {
self._events
}

internal var _events: ClusterEventStream
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know why I've added this 🫠 revert back

@ktoso
Copy link
Member

ktoso commented Oct 25, 2024

The failure was #1089 again.

We can merge with it failing as we need to investigate that one separately

@ktoso
Copy link
Member

ktoso commented Oct 25, 2024

We can disable the test until then as well

@@ -424,7 +428,7 @@ public class ClusterSystem: DistributedActorSystem, @unchecked Sendable {

deinit {
// self.shutdownFlag.destroy()

print("\(Self.self) DEINIT")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget to remove

@@ -57,7 +57,7 @@ public final class _ActorShell<Message: Codable>: _ActorContext<Message>, Abstra
internal let _dispatcher: MessageDispatcher

@usableFromInline
internal var _system: ClusterSystem?
internal weak var _system: ClusterSystem?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh yeah i can see that... previously actor trees destroyed things and now we don't i guess

@@ -161,8 +162,9 @@ extension TestMetrics {
}

func getSWIMCounter(_ swimShell: SWIMActor, _ body: (SWIM.Metrics.ShellMetrics) -> Counter) async throws -> TestCounter? {
let counter = await swimShell.whenLocal { __secretlyKnownToBeLocal in // TODO(distributed): rename once https://github.com/apple/swift/pull/42098 is implemented
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep!


self.lazyInitializationLock.withWriterLockVoid {
self._serialization = nil
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice thx

@ktoso
Copy link
Member

ktoso commented Oct 28, 2024

Still missing the latest changes probably and requiring 6.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClusterSystem is leaking
2 participants