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.2: storage: Use batches for direct RocksDB mutations #55745

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

itsbilal
Copy link
Contributor

20.2 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:44
@itsbilal itsbilal self-assigned this Oct 20, 2020
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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 though I think we should hold off on merging this until 20.2 is out the door.

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.2-rocksdb-batch-fix branch from 6ca319b to b633d91 Compare November 11, 2020 15:29
@itsbilal itsbilal merged commit 6c240be into cockroachdb:release-20.2 Nov 11, 2020
@itsbilal itsbilal deleted the 20.2-rocksdb-batch-fix branch November 11, 2020 16:52
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