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

[dbnode] Fixing entry leak in series ref resolver #3980

Merged
merged 5 commits into from
Dec 9, 2021

Conversation

soundvibe
Copy link
Collaborator

@soundvibe soundvibe commented Dec 8, 2021

What this PR does / why we need it:

SeriesRefResolver might leak entries if they are not already inserted.
This PR decrements reader writer count when resolving new entry from the resolver so the entry could be purged later.

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:


Does this PR require updating code package or user-facing documentation?:


@@ -2040,6 +2040,8 @@ func TestSeriesRefResolver(t *testing.T) {
require.NoError(t, err)
err = resolverEntry.ReleaseRef()
require.NoError(t, err)
entry := seriesRef.(*Entry)
require.Zero(t, entry.ReaderWriterCount())
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@soundvibe soundvibe merged commit b537ebe into master Dec 9, 2021
@soundvibe soundvibe deleted the linasn/resolver-entry-leak-fix branch December 9, 2021 13:35
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.

2 participants