[ https://issues.apache.org/jira/browse/ATLAS-474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15177910#comment-15177910 ]
David Kantor commented on ATLAS-474: ------------------------------------ [~shwethags] Agreed that super types should be a set in the type system, and I will make that change and re-submit. However, the type store fix is still needed, as the problem of duplicate edges from type store updates was not limited to super types. Currently, a type system update ends up duplicating all edges, including edges for attributes. The other duplicate edges are not fatal to system startup and so have existed undetected since day one. There is specific checking for duplicate super types in TypeSystem.TransientTypeSystem.validateSuperTypes() and that is what causes the server startup issue described in this bug. The type system vertices are not duplicated during an update because there is a check to prevent duplicates in GraphBackedTypeStore.createVertex(). There was no such check in GraphBackedTypeStore.addEdge(), and as result, duplicate edges were written. So I believe the existence check fix that I've added there is still needed. > Server does not start if the type is updated with same super type class > information > ----------------------------------------------------------------------------------- > > Key: ATLAS-474 > URL: https://issues.apache.org/jira/browse/ATLAS-474 > Project: Atlas > Issue Type: Bug > Affects Versions: trunk > Environment: sandbox > Reporter: Chethana > Assignee: David Kantor > Priority: Blocker > Attachments: rb44100.patch > > > Create a class with a superType class. > Use update API and do not change the request used. > Restart atlas server > Fails with exception > K":1},"pattern":"static","timestamp":"1454921806183"} stored data: > {"version":1,"subscription":{"ATLAS_HOOK":1},"pattern":"static","timestamp":"1454921372384"} > (ZkUtils$:68) > 2016-02-09 00:00:02,149 INFO - [ZkClient-EventThread-91-localhost:9026:] ~ I > wrote this conflicted ephemeral node > [{"version":1,"subscription":{"ATLAS_HOOK":1},"pattern":"static","timestamp":"1454921806183"}] > at /consumers/atlas/ids/atlas_Chethanas-MBP.local-1454412213224-de1ce8e6 a > while back in a different session, hence I will backoff for this node to be > deleted by Zookeeper and retry (ZkUtils$:68) > 2016-02-09 00:00:02,554 INFO - [ProcessThread(sid:0 cport:-1)::] ~ Got > user-level KeeperException when processing sessionid:0x152a1b9238e0051 > type:create cxid:0x3f0bf zxid:0x1c0ec txntype:-1 reqpath:n/a Error > Path:/consumers/atlas/ids/atlas_Chethanas-MBP.local-1454412213224-de1ce8e6 > Error:KeeperErrorCode = NodeExists for > /consumers/atlas/ids/atlas_Chethanas-MBP.local-1454412213224-de1ce8e6 > (PrepRequest...skipping... > at > org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) > at org.eclipse.jetty.server.Server.doStart(Server.java:354) > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > at > org.apache.atlas.web.service.EmbeddedServer.start(EmbeddedServer.java:88) > at org.apache.atlas.Atlas.main(Atlas.java:107) > Caused by: java.lang.RuntimeException: org.apache.atlas.AtlasException: Type > classa3ozcd7yra extends superType superClassa3ozcd7yra multiple times > at > org.apache.atlas.services.DefaultMetadataService.restoreTypeSystem(DefaultMetadataService.java:113) > at > org.apache.atlas.services.DefaultMetadataService.<init>(DefaultMetadataService.java:100) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:526) > at > com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:86) > at > com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) -- This message was sent by Atlassian JIRA (v6.3.4#6332)