Skip to content

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

Merged
CalvinNeo merged 3 commits intopingcap:raftstore-proxy-6.2from
CalvinNeo:fix-empty-batch-proxy
Sep 5, 2022
Merged

Don't write to rockdb when meet empty write batch#159
CalvinNeo merged 3 commits intopingcap:raftstore-proxy-6.2from
CalvinNeo:fix-empty-batch-proxy

Conversation

@CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Sep 5, 2022

Signed-off-by: CalvinNeo calvinneo1995@gmail.com

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 <calvinneo1995@gmail.com>
CalvinNeo and others added 2 commits September 5, 2022 15:25
f
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
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