Hi,I have a problem with Pydgraph.I need to specify the Uid.But I found that the UID of the node I specified still seemed to conflict with the system generated.How is UID generated?
UIDs are generated by Zero. If you want to set your own UIDs, you could try the method provided here.
/assign?what=uids&num=100 This would allocate num uids and return a JSON map containing startId and endId , both inclusive. This id range can be safely assigned externally to new nodes during data ingestion.
Assuming the default setup (http port for zero is at 6080), this command will reserve a 100 uids for you: http://localhost:6080/assign?what=uids&num=100
The response to this request might look something like this:
startId
“115”
endId
“214”
This means that the uids from 0x73 to 0xd6 are reserved for you. We can use one of the reserved UIDs as below. This was fired from ratel directly after reserving uids.
I was saying that in 20.03.x versions, you may find the uid 0x1 to be already used. That doesn’t happen anymore in the latest 20.07.x versions. So, no need to worry about the uid 0x1 not being available anymore.