-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Unload issue with relationships #3296
Comments
@igorT This seems acceptable. Do you mean something more than refcounting? Do you end up needing a cycle collector? |
The algorithm needed to be implemented is:
|
I can't quite wrap my head around this issue but would a symptom of this problem be that unloaded records are still being returned from |
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Includes work from @igorT and @sly7-7 [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Finally - Add a lot of `toString`s to test classes, as a debugging convenience. - Minor test cleanup Includes work from @igorT, @sly7-7 and @pangratz [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Finally - Add a lot of `toString`s to test classes, as a debugging convenience. - Minor test cleanup Includes work from @igorT, @sly7-7 and @pangratz [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Finally - Add a lot of `toString`s to test classes, as a debugging convenience. - Minor test cleanup Includes work from @igorT, @sly7-7 and @pangratz [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Finally - Add a lot of `toString`s to test classes, as a debugging convenience. - Minor test cleanup Includes work from @igorT, @sly7-7 and @pangratz [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Finally - Add a lot of `toString`s to test classes, as a debugging convenience. - Minor test cleanup Includes work from @igorT, @sly7-7 and @pangratz [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Finally - Add a lot of `toString`s to test classes, as a debugging convenience. - Minor test cleanup Includes work from @igorT, @sly7-7 and @pangratz [Fix emberjs#3296] [Supercede emberjs#3301]
`internalModel`s need to stay around as long as they're connected to a live record via relationships. Once an entire subgraph is removed however, we can free all of it. Also add a couple of "late private" fields to `internalModel`'s constructor for shape preservation. Finally - Add a lot of `toString`s to test classes, as a debugging convenience. - Minor test cleanup Includes work from @igorT, @sly7-7 and @pangratz [Fix emberjs#3296] [Supercede emberjs#3301]
It is not clear what unloading should do with regards to relationships. It seems to me that it should dematerialize a record, but keep the internalModel intact if it has SSOT foreign key references(removing foreign keys seems obviously incorrect).
This is problematic though, because internalModels will still leak memory. How do we let users unload a bunch of related records? Does this mean we have to write a mini Garbage Collector, that will anytime you unload a record, check the foreign key dependencies and unload things it can. This doesn't sound too bad, can you confirm it is the right thing to do?
The text was updated successfully, but these errors were encountered: