Deleting nodes, redux

The problem of a feature working fine one day and then breaking the next is starting to become a bit of a recurring theme.

I was able to delete nodes fine until yesterday – just to reiterate the procedure, I define a schema with the node type and predicate list, make sure the node is assigned to its type, delete all incoming edges to the node, and then delete all outgoing edges with * *.

Here is the Ratel response for a sample predicate delete:

 {
  delete {
  <0x13d621> <p> * .
}
}

I have changed the name of the predicate to “p” for this post.

{
  "data": {
    "code": "Success",
    "message": "Done",
    "uids": {}
  },
  "extensions": {
    "server_latency": {
      "parsing_ns": 11547,
      "processing_ns": 28761524
    },
    "txn": {
      "start_ts": 23,
      "commit_ts": 24,
      "preds": [
        "1-p"
      ]
    }
  }
}
{
  all(func: has(p)) {
     uid
    p
    }
  }
{
  "data": {
    "all": [
      {
        "uid": "0x13d621",
        "p": "sample p"   
      },
      {
        "uid": "0x13d622",
        "p": "sample p1"
      },
      {
        "uid": "0x13d623",
        "p": "sample p2"
      },

I interpret from the fact that Ratel responded with “preds”: [
“1-p”
]

that dgraph knows that this predicate exists.

Also, the node does have a well-defined type:

{
  all(func: uid(0x13d621)) {
     uid
    dgraph.type
    }
  }
{
  "data": {
    "all": [
      {
        "uid": "0x13d621",
        "dgraph.type": [
          "Node"
        ]
      }
    ]
  },

We would greatly appreciate any advice – with apologies for the tag, @MichelDiz @amanmangal

np

Are you saying that the delete procedure S P * isn’t working at all?

The S P * pattern just deletes the values on that edge. It won’t delete the whole node.

Can you confirm that this is happening also with JSON? Get started with Dgraph
Also, would you mind testing with another type other than List?

Please, add the version you are using and the cluster config just in case.

Cheers.

It appears that way since the last one day.

I understand. I was just using this example to show that even a single predicate delete – which should be a routine operation, is running into an issue.

I tested it with a set of string predicates. It worked for all but one of them:

{
all(func: uid(0x13d621)) {
uid
dgraph.type
oS
ack
p
}
}

{
“data”: {
“all”: [
{
“uid”: “0x13d621”,
“dgraph.type”: [
“Node”
],
“p”: “Value Altered for post”
}
]
},

The predicates oS and ack were deleted, p was not.

I’m not immediately familiar with this method. I will try and learn about it.

I’m using version 1.1.0. There’s no cluster, one zero and one alpha run from the command line using the commands:

dgraph zero
bulkload (with folder out)
dgraph alpha --lru_mb=2048 -p out/0/p -w out/0/w
dgraph-ratel

Many thanks!