-
Notifications
You must be signed in to change notification settings - Fork 411
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
Eliminate the table lock between reading, writing and DDL operators #1162
Comments
There is a situation that one coprocessor request and one DDL operation will block all other coprocessor requests:
|
DeltaTree support online-ddl. Now comes another new question: |
The proposal for eliminating the blocking between reading and applying DDL operators for TiFlash: https://docs.google.com/document/d/1LDo3MLU5H3SranepCiDIskbsAU7tCG3dB5Jml_dD7Es/edit# |
Currently in
DAGQueryBlockInterpreter::executeTS
, a table structure read lock is created bytable_lock = storage->lockStructure(false, __PRETTY_FUNCTION__)
and kept holding inpipeline.transform([&](auto & stream) { stream->addTableLock(table_lock); });
. AndSchemaBuilder<Getter, NameMapper>::applyAlterPhysicalTable
need to obtain a table structure write lock. The current design could block parallel reads towards a table if the table's schema got updated.Actually by the design of DT, after the
read()
return an InputStream, we already have a snapshot of the storage. So we don't need to hold the table structure read lock during the life time of the InputStream.The text was updated successfully, but these errors were encountered: