Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-6404

After removing a tag from an entity, subsequent searches that would have matched that tag do not work

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.4.3
    • Fix Version/s: 4.0.0, 3.5.1
    • Component/s: Metadata
    • Labels:
      None
    • Release Notes:
      Fixed an issue with searching for an entity in Cask Tracker by metadata after a tag with the same prefix has been removed.
    • Rank:
      1|hzzfm7:

      Description

      Let's say you create a dataset "ds1", and add a tag "ds1tag". Now, search the dataset using the query "ds*". The dataset will be returned. Now, remove the tag "ds1tag". If you search for "ds*", or "d*" or "ds1tag" (queries that would have matched the dataset before deletion, the search API will not return. You will see the following NPE in the CDAP logs:

      2016-07-11 15:13:16,875 - ERROR [netty-executor-50:c.c.c.c.HttpExceptionHandler@49] - Unexpected error: request=GET /v3/namespaces/default/metadata/search?query=* user=<null>:
      java.lang.NullPointerException: null
      	at co.cask.cdap.data2.metadata.store.DefaultMetadataStore.searchMetadataOnType(DefaultMetadataStore.java:390) ~[co.cask.cdap.cdap-data-fabric-3.5.0-SNAPSHOT.jar:na]
      	at co.cask.cdap.data2.metadata.store.DefaultMetadataStore.searchMetadataOnType(DefaultMetadataStore.java:368) ~[co.cask.cdap.cdap-data-fabric-3.5.0-SNAPSHOT.jar:na]
      	at co.cask.cdap.metadata.DefaultMetadataAdmin.searchMetadata(DefaultMetadataAdmin.java:151) ~[co.cask.cdap.cdap-app-fabric-3.5.0-SNAPSHOT.jar:na]
      	at co.cask.cdap.metadata.MetadataHttpHandler.searchMetadata(MetadataHttpHandler.java:847) ~[co.cask.cdap.cdap-app-fabric-3.5.0-SNAPSHOT.jar:na]
      	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_79]
      	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79]
      	at co.cask.http.HttpMethodInfo.invoke(HttpMethodInfo.java:80) ~[co.cask.http.netty-http-0.14.0.jar:na]
      	at co.cask.http.HttpDispatcher.messageReceived(HttpDispatcher.java:38) [co.cask.http.netty-http-0.14.0.jar:na]
      	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314) [io.netty.netty-3.6.6.Final.jar:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abhinav Abhinav Bansal
                Reporter:
                yue Yue Gao
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: