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

Dataset can be created in non-existent namespace

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0, 3.0.0, 2.8.0
    • Fix Version/s: 3.2.0
    • Component/s: Datasets, Namespaces
    • Labels:
    • Release Notes:
      Fixed a problem where a dataset could be created in a non-existent namespace in standalone mode.
    • Rank:
      1|hzyq2v:

      Description

      InMemoryDatasetFramework does not validate whether a namespace exists before performing dataset operations in that namespace.

      To reproduce:

      $ curl -v localhost:10000/v3/namespaces/anew
      < HTTP/1.1 404 Not Found
      Namespace anew not found
      
      $ curl -v localhost:10000/v3/namespaces/anew/data/datasets
      < HTTP/1.1 200 OK
      []
      
      $ curl -v localhost:10000/v3/namespaces/anew/data/datasets/mytab -XPUT --data '{ "typeName":"table", "properties": { } }'
      < HTTP/1.1 200 OK
      
      $ curl -v localhost:10000/v3/namespaces/anew/data/datasets
      < HTTP/1.1 200 OK
      [{"name":"mytab","type":"table","properties":{}}]
      
      $ curl -v localhost:10000/v3/namespaces
      < HTTP/1.1 200 OK
      []
      
      $ curl -v localhost:10000/v3/namespaces/anew
      < HTTP/1.1 404 Not Found
      Namespace anew not found
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bhooshan Bhooshan Mogal
                Reporter:
                andreas Andreas Neumann
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: