[
https://issues.apache.org/jira/browse/PHOENIX-6186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17228858#comment-17228858
]
ASF GitHub Bot commented on PHOENIX-6186:
-----------------------------------------
ChinmaySKulkarni commented on a change in pull request #935:
URL: https://github.com/apache/phoenix/pull/935#discussion_r520188127
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
##########
@@ -2037,7 +2049,10 @@ public void createTable(RpcController controller,
CreateTableRequest request,
// view's property in case they are different from the
parent
ViewUtil.addTagsToPutsForViewAlteredProperties(tableMetadata, parentTable);
}
-
+ //set the last DDL timestamp to the current server time since
we're creating the
+ // table
+
tableMetadata.add(MetaDataUtil.getLastDDLTimestampUpdate(tableKey,
+ clientTimeStamp,
EnvironmentEdgeManager.currentTimeMillis()));
Review comment:
Do we want to restrict this to just tables and views i.e. 'u' and 'v'
table_types? The upgrade code only adds a ts for existing tables and views, but
not indexes and SYSTEM tables, but here we do it for all types. There will be
inconsistency in that case between an index created before the 4.16 metadata
upgrade (no ts) vs an index created after the 4.16 metadata upgrade (has ts),
not to mention fresh clusters will have a ts for all entities.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Store table metadata last modified timestamp in PTable / System.Catalog
> -----------------------------------------------------------------------
>
> Key: PHOENIX-6186
> URL: https://issues.apache.org/jira/browse/PHOENIX-6186
> Project: Phoenix
> Issue Type: New Feature
> Reporter: Geoffrey Jacoby
> Assignee: Geoffrey Jacoby
> Priority: Major
> Fix For: 4.16.0
>
> Attachments: PHOENIX-6186-4.x.patch
>
>
> There are many reasons why it's useful to know when a particular table's
> metadata was last modified. It's helpful when solving cache coherency
> problems, and also in order to interact with external schema registries which
> may have multiple versions of a particular schema and require a timestamp to
> resolve ambiguities.
> This JIRA will add a last modified timestamp field to System.Catalog, to be
> updated both when creating a table/view and also when adding or removing a
> column. Changing purely internal Phoenix properties will not update the
> timestamp.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)