GitHub user ChinmaySKulkarni opened a pull request: https://github.com/apache/phoenix/pull/363
PHOENIX-4891: An index should inherit UPDATE_CACHE_FREQUENCY setting from parent table **(WIP Patch)** Changes in this commit: - When creating a local or global index on a physical table/view, we set the UPDATE_CACHE_FREQUENCY value from the base table/view - When altering the U_C_F value of a base table/view, we alter the same for all of its indexes - Since we want this property to be in sync amongst tables and their indexes, I am currently disallowing setting U_C_F when creating an index _AND_ disallowing altering this property for an index **TODO/Discussion:** - Handle the case of a client connecting to a server with an old timestamp of SYSCAT i.e. the upgrade code-path. Should we sync the U_C_F property amongst tables/views and their indexes? **OR**, should we instead allow altering U_C_F for indexes and make this the user's responsibility to manually do this as they need? - Currently, when a view is created, it inherits the U_C_F value of the base table already. Thus, indexes created on the view will also inherit the same value. However, we can later alter the U_C_F of a view (which will be propagated to its indexes). I think this is desired behavior, and a view need not have the same U_C_F value as its base table throughout its lifetime (though the index of a view should be in sync with the view), but open to other suggestions. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ChinmaySKulkarni/phoenix PHOENIX-4891 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/phoenix/pull/363.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #363 ---- commit f7d6953b7dd69698b4a56fe60cf72b666ae2be2b Author: Chinmay Kulkarni <chinmayskulkarni@...> Date: 2018-10-12T02:44:47Z PHOENIX-4891: An index should inherit UPDATE_CACHE_FREQUENCY setting from parent table (WIP Patch) ---- ---