then we do a subspace of directory.subspace(“a_b_c”) and look at keys
is the “correct” behavior that it returns only
pack(“a_b_c”, “1”)
pack(“a_b_c”, “2”)
or is
pack(“a_b_c_d”, “3”) also considered part of the space
In other words, I’m trying to understand if pack is just a string-concat, or is there if something else going on. This detail is important to me due to trying to understand how range queries work. Thanks.
The last KV won’t be included in the subspace. If you look at the tuple encoding schema, you’ll see why. Strings are terminated with a 2-byte code, so the string “a_b_c” won’t be a prefix of “a_b_c_d”.
If you want “a_b_c_d” to be included, I suggest you encode each piece as a separate string: (”a”, “b”, “c”, …)