[ https://issues.apache.org/jira/browse/KYLIN-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16617247#comment-16617247 ]
Chang chen edited comment on KYLIN-3562 at 9/17/18 8:57 AM: ------------------------------------------------------------ [~Shaofengshi] Please look at this issue. we will meet it regularly every day since last week. It looks like a concurrency issue, i.e. two threads simultaneously update /user/admin. Obviously, one thread get oldTS before another thread updates key. !image-2018-09-17-16-40-56-212.png! Above is result not reason, because we find that kylin update user very frequently! Taking a look at *KylinAuthenticationProvider.authenticate*, if the user is in userCache, then we will avoid call *KylinUserService.updateUser*, but unfortunately *updateUser* will set {color:#ff0000}_evictCacheFlag_{color} to true which makes userCache is invalidated at the next *authenticate* call. was (Author: baibaichen): [~Shaofengshi] Please look at this issue. we will meet it regularly every day since last week. It looks like a concurrency issue, i.e. two threads simultaneously update /user/admin. Obviously, one thread get oldTS before another thread. !image-2018-09-17-16-40-56-212.png! Above is result not reason, because we find that kylin update user very frequently! Taking a look at *KylinAuthenticationProvider.authenticate*, if the user is in userCache, then we will avoid call *KylinUserService.updateUser*, but unfortunately *updateUser* will set {color:#FF0000}_evictCacheFlag_{color} to true which makes userCache is invalidated at the next *authenticate* call. > TS conflict when kylin update metadata in HBase > ----------------------------------------------- > > Key: KYLIN-3562 > URL: https://issues.apache.org/jira/browse/KYLIN-3562 > Project: Kylin > Issue Type: Bug > Affects Versions: v2.4.0 > Reporter: Lingang Deng > Priority: Major > Attachments: image-2018-09-17-16-40-56-212.png > > > Error log was as follows, > {code:java} > org.apache.kylin.common.persistence.WriteConflictException: Overwriting > conflict /user/admin, expect old TS 1536928877043, but it is 1536928907207 > at > org.apache.kylin.storage.hbase.HBaseResourceStore.checkAndPutResourceImpl(HBaseResourceStore.java:325) > at > org.apache.kylin.common.persistence.ResourceStore.checkAndPutResourceCheckpoint(ResourceStore.java:318) > at > org.apache.kylin.common.persistence.ResourceStore.putResource(ResourceStore.java:303) > at > org.apache.kylin.common.persistence.ResourceStore.putResource(ResourceStore.java:282) > at > org.apache.kylin.metadata.cachesync.CachedCrudAssist.save(CachedCrudAssist.java:192){code} > > what disturbs me the most was that the error was happened several hours, > then my all build job and query job failed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)