Skip to content

Eliminate the table lock between reading,writing and DDL operators for TiFlash (for POC)#1973

Merged
zanmato1984 merged 4 commits intopingcap:v5.0.1_may_pocfrom
JaySon-Huang:table_lock_poc
May 23, 2021
Merged

Eliminate the table lock between reading,writing and DDL operators for TiFlash (for POC)#1973
zanmato1984 merged 4 commits intopingcap:v5.0.1_may_pocfrom
JaySon-Huang:table_lock_poc

Conversation

@JaySon-Huang
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch:

Check List

Tests

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

Side effects

Release note

JaySon-Huang and others added 4 commits May 23, 2021 20:21
…r TiFlash (pingcap#1736)

1. Port the latest `RWLock` for `IStorage` from Clickhouse. "phase-fair rwlocks have been shown to provide more predictable timings compared to task-fair rwlocks for certain workloads (for relatively low share of writes, <25%). Brandenburg B, Anderson J, (2010)"
2. Refactor the lock model for `IStorage` to eliminate the lock between reading, writing, and DDL operations.
3. Acquire table lock by QueryID/threadName instead of function name
3. Tombstone the database after receiving a "drop" DDL from TiDB. Physically drop the databases / tables after gc safe point.
3. Remove some outdated tests under `tests/mutable-test/txn_schema` (all those tests are ported into `tests/delta-merge-test/raft/schema`)

Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>

 Conflicts:
	dbms/src/Databases/test/gtest_database.cpp
	dbms/src/Storages/GCManager.cpp
	dbms/src/Storages/Transaction/ApplySnapshot.cpp
	dbms/src/Storages/Transaction/PartitionStreams.cpp
 Conflicts:
	dbms/src/Storages/DeltaMerge/DeltaMergeStore.cpp
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>

 Conflicts:
	dbms/src/Storages/Transaction/ApplySnapshot.cpp
	dbms/src/Storages/Transaction/PartitionStreams.cpp
@JaySon-Huang JaySon-Huang added the CHERRY-PICK cherry pick label May 23, 2021
@JaySon-Huang JaySon-Huang requested a review from zanmato1984 May 23, 2021 13:03
@JaySon-Huang JaySon-Huang self-assigned this May 23, 2021
Copy link
Contributor

@zanmato1984 zanmato1984 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label May 23, 2021
@zanmato1984 zanmato1984 merged commit 2b3ed6d into pingcap:v5.0.1_may_poc May 23, 2021
@JaySon-Huang JaySon-Huang deleted the table_lock_poc branch May 23, 2021 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CHERRY-PICK cherry pick status/LGT1 Indicates that a PR has LGTM 1.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants