Ludicrous mode doesn't delete edges with S * * deletion

What version of Dgraph are you using?

Dgraph master

Dgraph version   : v20.11.0-g3ed726fca
Dgraph codename  : unnamed-mod
Dgraph SHA-256   : f93da214a4ee7026f20916bd567712bf1e89c6a6ca086396bcf4f421046c72da
Commit SHA-1     : 3ed726fca
Commit timestamp : 2020-10-20 21:08:29 +0530
Branch           : master
Go version       : go1.14.4
jemalloc enabled : true

Have you tried reproducing the issue with the latest release?

Yes. Reproducible in

  • v20.07.2-rc1
  • v20.03.6-rc1
  • master (3ed726fca)

(steps don’t work in v20.07.1 or v20.03.5).

What is the hardware spec (RAM, OS)?

64 GB Ubuntu Linux

Steps to reproduce the issue (command/config used to run Dgraph).

  1. Run Dgraph with ludicrous mode enabled.

  2. Set schema for type:

    name: string .
    xid: string .
    type MyType {
      name
      xid
    }
    
  3. Insert a node with the type:

    {
      set {
        _:n <dgraph.type> "MyType" .
        _:n <name> "Alice" .
        _:n <xid> "10" .
      }
    }
    
  4. Query for the node using its uid:

    {
      q(func: uid(0x2)) {
        uid
        dgraph.type
        name
        xid
      }
    }
    

    Response:

    {
      "data": {
        "q": [
          {
            "uid": "0x2",
            "dgraph.type": [
              "MyType"
            ],
            "name": "Alice",
            "xid": "10"
          }
        ]
      }
    }
    
  5. Do an S * * deletion:

    {
      delete {
        <0x2> * * .
      }
    }
    
  6. Run the same query in Step 4. The response that is returned is:

    {
      "data": {
        "q": [
          {
            "uid": "0x2",
            "name": "Alice",
            "xid": "10"
          }
        ]
      }
    }
    

Expected behaviour and actual result.

The expected result is an empty query response. But, only dgraph.type was deleted.

When ludicrous mode is turned off, S * * deletion works as expected.


Note about v20.07.1:

In v20.07.1, when running the S * * deletion in Step 5, I get this query error back:

Txn Context is nil: While adding pb.edges: readTs: 0 less than minTs: 7 for key: \"\\x00\\x00\\vdgraph.type\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\"