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

release-20.1: storage: Use batches for direct RocksDB mutations #55746

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

itsbilal
Copy link
Contributor

20.1 backport of #55708 .


Currently, doing direct mutations on a RocksDB instance bypasses
custom batching / syncing logic that we've built on top of it.
This, or something internal to RocksDB, started leading to some bugs
when all direct mutations started passing in WriteOptions.sync = true
(see #55240 for when this change went in).

In this change, direct mutations still commit the batch with sync=true
to guarantee WAL syncing, but they go through the batch commit pipeline
too, just like the vast majority of operations already do.

Fixes #55362.

Release note: None.

@itsbilal itsbilal requested review from tbg and petermattis October 20, 2020 15:45
@itsbilal itsbilal self-assigned this Oct 20, 2020
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@itsbilal itsbilal changed the title storage: Use batches for direct RocksDB mutations release-20.1: storage: Use batches for direct RocksDB mutations Oct 20, 2020
Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

LGTM

Currently, doing direct mutations on a RocksDB instance bypasses
custom batching / syncing logic that we've built on top of it.
This, or something internal to RocksDB, started leading to some bugs
when all direct mutations started passing in WriteOptions.sync = true
(see cockroachdb#55240 for when this change went in).

In this change, direct mutations still commit the batch with sync=true
to guarantee WAL syncing, but they go through the batch commit pipeline
too, just like the vast majority of operations already do.

Fixes cockroachdb#55362.

Release note: None.
@itsbilal itsbilal force-pushed the 20.1-rocksdb-batch-fix branch from 5d7dfdd to 2e64251 Compare November 11, 2020 15:37
@itsbilal itsbilal merged commit 30a28ee into cockroachdb:release-20.1 Nov 11, 2020
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.

3 participants