mirror of
https://github.com/apache/impala.git
synced 2026-01-06 06:01:03 -05:00
There was race when the catalog was invalidated at the same time a table was being loaded. This is because an uninitialized Table was being returned unexpectedly to the impalad due to the concurrent invalidate. This fixes the problem by updating the CatalogObjectCache to load when a catalog object is uninitialized, rather than load when null. New items can now be added in a initialized or uninitialized state; uninitialized objects are loaded on access. Also adds a stress test for invalidate metadata/invalidate metadata <table>/refresh In addition, it cleans up the locking in the Catalog to make it more straight forward. The top-level catalogLock_ is now only in CatalogServiceCatalog and this lock is used to protect the catalogVersion_. Operations that need to perform an atomic bulk catalog operation can use this lock (such as when the CatalogServer needs to take a snapshot of the catalog to calculate what delta to send to the statestore). Otherwise, the lock is not needed and objects are protected by the synchronization at each level in the object heirarchy (Db->[Function/Table]). That is, Dbs are synchronized by the Db cache, each Db has a Table Cache which is synchronized independently. Change-Id: I9e542cd39cdbef26ddf05499470c0d96bb888765 Reviewed-on: http://gerrit.ent.cloudera.com:8080/1355 Reviewed-by: Lenni Kuff <lskuff@cloudera.com> Tested-by: jenkins Reviewed-on: http://gerrit.ent.cloudera.com:8080/1418
9 lines
124 B
Plaintext
9 lines
124 B
Plaintext
====
|
|
---- QUERY : STRESS-Q1
|
|
select count(*) from (select * from lineitem limit 10) p
|
|
---- RESULTS
|
|
10
|
|
---- TYPES
|
|
bigint
|
|
====
|