The lock in BlobStore::removePosFromStats
introducing performance jitter
#8650
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
component/storage
severity/major
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
When all page data in a BlobFile gets removed in the GC thread,
removePosFromStats
will remove the BlobFile from disk. However, it holds a lock onmtx_blob_files
when removing the file from disk. IfBlobStore::write
happens to write a page data to a new BlobFile,BlobStore::getBlobFile
will be blocked by the GC thread.According to local tests, removing a BlobFile takes tens of milliseconds. Thus introducing performance jitter.
tiflash/dbms/src/Storages/Page/V3/BlobStore.cpp
Lines 803 to 814 in 63eb295
tiflash/dbms/src/Storages/Page/V3/BlobStore.cpp
Lines 632 to 636 in 63eb295
tiflash/dbms/src/Storages/Page/V3/BlobStore.cpp
Lines 1494 to 1503 in 63eb295
4. What is your TiFlash version? (Required)
master
The text was updated successfully, but these errors were encountered: