Skip to content

sstable: avoid allocating up to maximum block size in valueBlockWriter#2236

Merged
nicktrav merged 1 commit intocockroachdb:masterfrom
sumeerbhola:reader_alloc
Jan 11, 2023
Merged

sstable: avoid allocating up to maximum block size in valueBlockWriter#2236
nicktrav merged 1 commit intocockroachdb:masterfrom
sumeerbhola:reader_alloc

Conversation

@sumeerbhola
Copy link
Copy Markdown
Collaborator

Tests can set a high maximum block size e.g. TestReader sets the block size to 2GB. This resulted in a 3GB byte slice being allocated. The new logic is similar to the behavior in blockWriter.

Fixes #2159

Tests can set a high maximum block size e.g. TestReader sets the block size
to 2GB. This resulted in a 3GB byte slice being allocated. The new logic
is similar to the behavior in blockWriter.

Fixes cockroachdb#2159
@sumeerbhola sumeerbhola requested review from a team and nicktrav January 11, 2023 21:05
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@nicktrav nicktrav left a comment

Choose a reason for hiding this comment

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

Thanks for fixing! :lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @sumeerbhola)

@nicktrav
Copy link
Copy Markdown
Contributor

Going to merge this on your behalf so I can re-enable the Linux race job.

@nicktrav nicktrav merged commit 5bad2c1 into cockroachdb:master Jan 11, 2023
nicktrav added a commit to nicktrav/pebble that referenced this pull request Jan 11, 2023
nicktrav added a commit that referenced this pull request Jan 12, 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.

ci: investigate linux-race failures in GitHub actions

3 participants