oxia
oxia copied to clipboard
RangeScan on the server should probably stop at internal keys
Internal keys can't be deserialized, which results in a range scan request failing if the client doesn't exclude them. For example, I did a range scan using the empty string for both the start and end of the range:
Error: TonicStatus(Status { code: Unknown, message: "failed to Deserialize storage entry: proto: wrong wireType = 1 for field ModificationsCount", metadata: MetadataMap { headers: {"content-type": "application/grpc"} }, source: None })
Rather than replicate logic such as below in all clients, the server should either filter the keys or support deserializing them.
if Config.keyMax == "" {
// By default, do not list internal keys
Config.keyMax = "__oxia/"
}
I see this is a bit messier than I thought:
- Most of the
__oxia/keys can be deserialized, the notifications are the special cases? - there's nothing currently to prevent a client from inserting a key such as
__oxia/notifications/0which ends up in this "non-scannable" range.