Missing data

Report a GraphQL Bug

What edition and version of Dgraph are you using?

Edition:

  • SlashGraphQL
  • [ x] Dgraph (community edition/Dgraph Cloud)

If you are using the community edition or enterprise edition of Dgraph, please list the version:

Dgraph Version
$ dgraph version
 
Dgraph version   : v20.11.0
Dgraph codename  : tchalla
Dgraph SHA-256   : 8acb886b24556691d7d74929817a4ac7d9db76bb8b77de00f44650931a16b6ac
Commit SHA-1     : c4245ad55
Commit timestamp : 2020-12-16 15:55:40 +0530
Branch           : HEAD
Go version       : go1.15.5
jemalloc enabled : true

Using dgraph in a docker

Have you tried reproducing the issue with the latest release?

First of all i wanted to apologize for any mistake, English is not my mother tongue so will certainly do a lot of silly mistake.
No

Steps to reproduce the issue (paste the query/schema if possible)

Not really done anything
The only thing i can think of to cause that is the recreation of my docker (i just erase my image using Docker-Desktop)

Here is my docker yaml

version: "3.2"
services:
  zero:
    image: dgraph/dgraph:latest
    container_name: zero
    volumes:
      - ./db:/dgraph
    ports:
      - 5080:5080
      - 6080:6080
    networks:
      vpcbr:
        ipv4_address: 172.16.0.5
    restart: on-failure
    command: dgraph zero --my=zero:5080
  alpha:
    image: dgraph/dgraph:latest
    container_name: alpha
    volumes:
      - ./db:/dgraph
    ports:
      - 8080:8080
      - 9080:9080
    networks:
      vpcbr:
        ipv4_address: 172.16.0.10
    restart: on-failure
    command: dgraph alpha --whitelist 172.16.0.1:172.32.0.1 --my=alpha:7080 --zero=zero:5080
  ratel:
    image: dgraph/dgraph:latest
    container_name: ratel
    ports:
      - 8000:8000
    networks:
      vpcbr:
        ipv4_address: 172.16.0.15
    command: dgraph-ratel
  python:
    container_name: pythonFlask
    restart: unless-stopped
    build:
      context: .
      dockerfile: dockerfile
    volumes:
      - ./src/:/usr/src/src/
    ports:
      - 5003:5000
    environment:
      PORT: 5000
    networks:
      vpcbr:
        ipv4_address: 172.16.0.20
networks:
  vpcbr:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.16.0.0/16
          gateway: 172.16.0.1

But i didn’t erase any file.

Expected behaviour and actual result.

I expected to found my data like usual.

At first i wasn’t able to add data to dgraph i got this error :

Transaction has been aborted. Please retry

I was able to see the data in Ratel but not with my query using python client.

So i restarted my dgraph
And now i can’t see any data in both.

But the weird part is that i can’t add data this give me the same error

Transaction has been aborted. Please retry

If i unterstand this error correctly that’s because there is a conflict with my data ?

I didn’t try to add new data for now.

I can still see a part of the data in the .vlog file.

Did i do something wrong or is it a bug ?

I still got all the directory : p,t,w and zw if needed.

Hope you can help me.

Thank you by advance.

Try to force the version to v20.11.0 instead of dgraph:latest - There might be something new in v20.11.2(which is today’s latest). Please, avoid using latest tag in production or even DEV. Just use it if you are just playing around. Cuz you could potentially mix incompatible files between versions.

What did you do?
this?

docker image rm xyz

Thanks for the quick response !

I will do this right away :slight_smile:

I didn’t delete the image but my containers like this : docker-compose rm myDgraph…

After this i just do a docker-compose up
And it created a new dgraph alpha container using the same image as before.

Right now i’m moved the older directory(p,t,w…) to get a clean “state” and for know it’s working fine.