Hey @rohanil,
Please find the answers inline:
- Keys are always inserted with a version inside Badger. Normally this version is the commit timestamp of the transaction in which key is set. In non managed mode, Oracle(check file txn.go in Badger repo) is responsible for increasing timestamp(after every transaction commit).
- You can get it from Oracle.
- Yes.
- I did not understand this question properly. In managed mode, user is responsible for providing commit timestamp of transaction. In Dgraph, it is done by Zero node(which maintains its own Oracle).