[
https://issues.apache.org/jira/browse/PHOENIX-2056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Samarth Jain updated PHOENIX-2056:
----------------------------------
Attachment: PHOENIX-2056.patch
Attached patch that adds the pk columns to indexes on views when the pk of base
table is changed.
[~jamestaylor] - please review when you get a chance. Thanks!
> Ensure PK column from base table is added to any indexes on views
> ------------------------------------------------------------------
>
> Key: PHOENIX-2056
> URL: https://issues.apache.org/jira/browse/PHOENIX-2056
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Assignee: Samarth Jain
> Attachments: PHOENIX-2056.patch
>
>
> Given that we allow a nullable PK column to be added to a base table and push
> it to all views (PHOENIX-1504), we need to ensure that the PK column is also
> added to any indexes on the view. Without this, indexes on views would no
> longer maintain their 1:1 correspondence with data rows.
> Since the pushing of the new column is done under lock in
> MetaDataEndPointImpl and we have a PTable instantiated for each view, we can
> just iterate through its indexes (view.getIndexes()) and generate a couple of
> additional Puts: one for the PK column row in the index and one for the
> header row of the index table to increment the column count. The index table
> header row needs to be added to the list of rows to be invalidated as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)