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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: address logging infinite recursion issue #621

Merged
merged 1 commit into from Jul 7, 2023

Conversation

rowanmanning
Copy link
Member

This cropped up as a bug recently where Content Discovery were trying to log an entire Request object, which references itself. This resulted in Node.js running out of memory because we were infinitely recursing over the properties.

This is a bug that's always been present in n-mask-logger.

I've addressed the issue with my first legit use of WeakSet and I'm quite pleased with myself about it 馃榿

@rowanmanning rowanmanning requested a review from a team July 6, 2023 16:02
@rowanmanning rowanmanning requested a review from a team as a code owner July 6, 2023 16:02
This cropped up as a bug recently where Content Discovery were trying to
log an entire Request object, which references itself. This resulted in
Node.js running out of memory because we were infinitely recursing over
the properties.

This is a bug that's always been present in n-mask-logger.

I've addressed the issue with my first legit use of `WeakSet` and I'm
quite pleased with myself about it 馃榿
@rowanmanning rowanmanning force-pushed the handle-circular-references-in-masking branch from acd024e to 225faa4 Compare July 7, 2023 07:48
@rowanmanning rowanmanning enabled auto-merge (rebase) July 7, 2023 07:56
Copy link
Contributor

@CyntiBinti CyntiBinti left a comment

Choose a reason for hiding this comment

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

Yay love a good hash set 馃檶馃徑

@rowanmanning rowanmanning merged commit 1eed362 into main Jul 7, 2023
12 checks passed
@rowanmanning rowanmanning deleted the handle-circular-references-in-masking branch July 7, 2023 15:24
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.

None yet

2 participants