FoundationDB as backend for JanusGraph - Iterate through all vertices

Gaurav,
Thanks for the link. I tried few things which were mentioned there.

The idea is,

  1. I get the startKey, endKey and limit from query.limit() - then get Iterable<KeyValue> Range
  2. Start consuming keyValues
  3. Hit error → create new txn → get nextKey from where the error occured → go to Step 1.
  4. When consumed all, then break

2 questions here:

  1. Is this idea okay?
  2. If yes, what would be the break condition here? How do I get that

Thanks!!