-
Notifications
You must be signed in to change notification settings - Fork 411
Closed
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Currently in DAGQueryBlockInterpreter::executeTS, a table structure read lock is created by table_lock = storage->lockStructure(false, __PRETTY_FUNCTION__) and kept holding in pipeline.transform([&](auto & stream) { stream->addTableLock(table_lock); });. And SchemaBuilder<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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.