You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pipeTopicToStorage was made as a replacement for makeStoredPublishKit that is compatible with durable publish kits but it kept using forEachPublicationRecord, which keeps all objects in heap: the storageNode (through consumeValue), the subscriber and its iterator.
Instead forEachPublicationRecord should use the watchPromise pattern, using a durable or virtual promise handler as appropriate for the use case.
Expected behavior
No heap usage related to the usage of pipeTopicToStorage or makeStoredPublishKit.
No use of forEachPublicationRecord (explicitly or transitively) in durable contracts.
Describe the bug
pipeTopicToStorage
was made as a replacement formakeStoredPublishKit
that is compatible with durable publish kits but it kept usingforEachPublicationRecord
, which keeps all objects in heap: thestorageNode
(throughconsumeValue
), thesubscriber
and its iterator.Instead
forEachPublicationRecord
should use thewatchPromise
pattern, using a durable or virtual promise handler as appropriate for the use case.Expected behavior
No heap usage related to the usage of
pipeTopicToStorage
ormakeStoredPublishKit
.No use of
forEachPublicationRecord
(explicitly or transitively) in durable contracts.Additional context
Found while investigating #7297
The text was updated successfully, but these errors were encountered: