[
https://issues.apache.org/jira/browse/PHOENIX-4726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16466493#comment-16466493
]
Xu Cang commented on PHOENIX-4726:
----------------------------------
uploaded a patch.
Testing step:
# create a table. upsert some data.
# Create a sync index. (not async way)
# check the 'SYNC_INDEX_CREATED_DATE' value
Testing oupput as below,
0: jdbc:phoenix:> select TABLE_SCHEM,
TABLE_NAME,COLUMN_NAME,SYNC_INDEX_CREATED_DATE from
SYSTEM.CATALOG(SYNC_INDEX_CREATED_DATE DATE) where SYNC_INDEX_CREATED_DATE is
not NULL;
+--------------+-------------+--------------+--------------------------+
| TABLE_SCHEM | TABLE_NAME | COLUMN_NAME | SYNC_INDEX_CREATED_DATE |
+--------------+-------------+--------------+--------------------------+
| | MY_IDX2 | | 2018-05-07 21:08:38.780 |
| | MY_TABLE | | 2018-05-07 21:01:55.806 |
| | MY_TABLE2 | | 2018-05-07 21:02:38.250 |
| SYSTEM | CATALOG | | 2018-05-07 20:55:42.008 |
| SYSTEM | FUNCTION | | 2018-05-07 20:55:47.547 |
| SYSTEM | SEQUENCE | | 2018-05-07 20:55:44.635 |
| SYSTEM | STATS | | 2018-05-07 20:55:45.939 |
+--------------+-------------+--------------+--------------------------+
7 rows selected (0.105 seconds)
0: jdbc:phoenix:>
> save index build timestamp -- for SYNC case only.
> -------------------------------------------------
>
> Key: PHOENIX-4726
> URL: https://issues.apache.org/jira/browse/PHOENIX-4726
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Xu Cang
> Priority: Minor
> Attachments: PHOENIX-4726.patch.1
>
>
> save index build timestamp, similar to ASYNC_REBUILD_TIMESTAMP, or
> ASYNC_CREATED_DATE
> ("SYNC_INDEX_CREATED_DATE" is my proposed name for SYNC case.)
>
> Check IndexUtil.java for related code.
> The reason this can be useful is: We saw a case index state stuck in 'b' for
> quite some long time. And without a timestamp to indicate where it started,
> it's hard to tell if this is a legit running task or stuck...
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)