Skip to content

sstable: don't intern CompressionStats #5098

@RaduBerinde

Description

@RaduBerinde

sstable.Properties has a CompressionStats field:

CompressionStats string `prop:"pebble.compression_stats"`

The loading code interns all string fields here:

field.SetString(intern.Bytes(val))

This is problematic because this string will be different for each sstable. The program will accumulate the strings for all the sstables it has seen over its lifetime.

The string is short so in practice it would probably take a very long time for this memory leak to become a problem.

Jira issue: PEBBLE-1102

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions