[ https://issues.apache.org/jira/browse/KYLIN-2373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15822828#comment-15822828 ]
chelubaiq commented on KYLIN-2373: ---------------------------------- The patch is attached. In the case of TABLE(for example, reload datasource table): DataModel in MetadataManager should be reloaded, because it caches instance of TableDesc which is reloaded; In the case of DATA_MODEL: 1 CubeInstance should be reloaded in CubeManager, because the cube may become invalid after editing model, which leads to kylin page not available to use(NPE for some api) until reload metadata; 2 then RealizationRegistry.clearCache() should be called, because RealizationRegistry caches the old instance of CubeManager, and the old will never be updated when creating new cube, which leads to tables not exposed for the Insight page after building cube; > kyin1.5.3, the exposed tables often disappear from the kylin Insight page. > -------------------------------------------------------------------------- > > Key: KYLIN-2373 > URL: https://issues.apache.org/jira/browse/KYLIN-2373 > Project: Kylin > Issue Type: Bug > Components: REST Service > Affects Versions: v1.5.3 > Reporter: chelubaiq > Assignee: Zhong,Jason > Attachments: KYLIN-2373_v1.5.4.1-beeline.patch > > > 1 environment: > kylin1.5.3 > tow nodes: "query" server a and "all" server b, > with config: kylin.rest.servers=a_ip,b_ip > 2 problem: > the exposed tables often disappear from the kylin Insight page. > the log says: > ERROR [http-bio-7070-exec-9] project.ProjectL2Cache:240 : Realization > 'CUBE[name=custom_out_sales4]' reports column 'PROJECT1.TABLE1.COLUMN1', but > it is not equal to 'ColumnDesc [name=COLUMN1,table=PROJECT1.TABLE1]' > according to MetadataManager > 3 one way to reproduce: > in project1, cube1 is ready; > in server a, choose project1, and reload one table from the DataSource of > Model page, succeed; the table exist in Insight page. > in server b, choose project1, refresh Insight page, no tables found: "No > Result." > if click "reload metadata" in the system page, tables will show up. > 4 > reason of table not found in server b: > in ProjectL2Cache, ColumnDesc from project realization is not equal to > ColumnDesc from MetadataManager, > because table.equals(other.table) is false in the ColumnDesc.equals() > method, > because table's lastModified not equal. > and table's lastModified from MetadataManager > from project realization > the bug may exist in CacheService.rebuildCache(): > case TABLE: > getMetadataManager().reloadTableCache(cacheKey); > CubeDescManager.clearCache(); > break; > MetadataManager.reloadAllDataModel() may be also needed here. > or MetadataManager.reloadDataModelDesc(forEachModelNameOfTheProject) > or MetadataManager.clearCache() > 5 > why table exist in server a's Insight page? > according to 4, server a should also have same equality problem and should > also disappear? -- This message was sent by Atlassian JIRA (v6.3.4#6332)