I’m trying to get the key ranges for a directory, in order to back it up. I noticed that if a subspace has a prefix of
\x01 for example, the range of the subspace, using
FDBRangeKeys(), will be
\x01\xff. (go bindings). (I see the same logic in c) But if someone were to write an empty key at the directory root (
foo) it wouldn’t be included in the range.
Similarly, the range reported would not include key/value written at
ExactRange is end-exclusive.
I noticed the backup logic is closer to what I expected–If I were to back up
-k \x01 it would back up
\x01 (inclusive) to
\x02 (exclusive). What is the reasoning for the subspace
FDBRangeKeys() behavior? (My guess is it could be related to tuple encoding?) Would it make more sense if it behaved the same as the backup range? Should we be preventing writing to subspace/directory roots?
My current plan is to specify only the directory prefix and let the backup logic calculate the appropriate start and end, rather than using the directory’s