Description
Currently, when creating a view we do conditional writes with a checkAndPut to SYSTEM.MUTEX for the keys:
(<physical parent's schema name>, <physical parent's table name>, <column name>)
for each column in the view WHERE clause. Similarly, when issuing an ALTER TABLE/VIEW, we do a conditional write with a checkAndPut to SYSTEM.MUTEX for the key:
(<physical parent's schema name>, <physical parent's table name>, <name of the column to add/drop>)
to prevent conflicting modifications between a base table/view and its child views. However, if we create a view with its own new columns, for ex:
CREATE VIEW V1 (NEW_COL1 INTEGER, NEW_COL2 INTEGER) AS SELECT * FROM T1 WHERE B = 10;
we will not do a checkAndPut with the new columns being added to the view (NEW_COL1 and NEW_COL2) thus conflicting concurrent mutations may occur to a parent in this case, for ex: a simultaneous ALTER TABLE/VIEW of the parent which adds NEW_COL1 as a VARCHAR. This will lead to data being unable to be read properly.
Attachments
Issue Links
- causes
-
PHOENIX-6230 IT suite hangs on ViewConcurrencyAndFailureIT
- Resolved
- links to