[Commits] 3b7567781: Range Locking: More comments
revision-id: 3b7567781e50b1ced3583a60fa7f1a568cc42d2e (v5.8-1033-g3b7567781) parent(s): 0ebc41a1c459263a30e2d2bc68348ed5bcdd59bd author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2019-04-08 16:29:58 +0300 message: Range Locking: More comments --- include/rocksdb/utilities/transaction.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/rocksdb/utilities/transaction.h b/include/rocksdb/utilities/transaction.h index 9dbba3df7..e980e032e 100644 --- a/include/rocksdb/utilities/transaction.h +++ b/include/rocksdb/utilities/transaction.h @@ -46,8 +46,15 @@ using TransactionID = uint64_t; then key_a < key_b. - An empty string is less than any other constant (from this it follows that - for any prefix and suffix, {prefix, suffix} > {prefix}) + 2. An empty string is less than any other value. From this it follows that + for any prefix and suffix, {prefix, suffix} > {prefix}. + + 3. The row comparison function can compare key prefixes. If the data domain + includes keys A and B, then the comparison function is able to compare + equal-length prefixes: + + min_len= min(byte_length(A), byte_length(B)); + cmp(Slice(A, min_len), Slice(B, min_len)) == Prefix ranges == With lexicographic-like ordering, one may to construct ranges from a
participants (1)
-
Sergei Petrunia