Description
In an Impala test on a 200-node cluster with 40 concurrent query streams, I see the master has high contention on TableInfo::lock_. Two issues seem to be at play:
1) we could easily swap it for a rwlock for a big win, since it's a read-mostly structure
2) GetTableSchema() calls IsCreateTableDone() which is O in the number of tablets. For each tablet, we acquire its rwc lock, so the iteration isn't cheap. The table-wide "create table done" state seems quite cacheable.