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

Fix missed release span on column db #6302

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

asdacap
Copy link
Contributor

@asdacap asdacap commented Nov 27, 2023

Changes

  • Added the implementation.
  • Added extra tests to prevent this from happening again.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

  • confirm reproducable via stressing eth_getLogs.

@MarekM25 MarekM25 self-requested a review November 27, 2023 20:59
@@ -591,7 +593,10 @@ internal Span<byte> GetSpanWithColumnFamily(ReadOnlySpan<byte> key, ColumnFamily
{
Span<byte> span = _db.GetSpan(key, cf);
if (!span.IsNullOrEmpty())
{
Interlocked.Increment(ref _allocatedSpan);
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to keep that in the prod (non-test) code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I suppose we should.

@kamilchodola kamilchodola merged commit ad54c5f into master Nov 28, 2023
71 checks passed
@kamilchodola kamilchodola deleted the fix/memory-leak-on-columndb branch November 28, 2023 10:14
kamilchodola pushed a commit that referenced this pull request Nov 28, 2023
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

5 participants