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

Don't write to rockdb when meet empty write batch #159

Merged

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Sep 5, 2022

Signed-off-by: CalvinNeo [email protected]

What problem does this PR solve?

Issue Number: close pingcap/tiflash#5783

Problem Summary:

There is a vulnerability in TiKV that we may meet deadlock when try to write an empty WriteBatch into RocksDB, if enable_pipelined_write = false

Aka tikv/rocksdb#312

Though we don't know exactly which codes actually bring about this vulnerability, we can still prevent writes to rocksdb and print out a log trace.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

f
Signed-off-by: CalvinNeo <[email protected]>
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.

2 participants