oxia icon indicating copy to clipboard operation
oxia copied to clipboard

RangeScan on the server should probably stop at internal keys

Open mauricebarnum opened this issue 8 months ago • 1 comments

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/"
	}

mauricebarnum avatar Apr 23 '25 22:04 mauricebarnum

I see this is a bit messier than I thought:

  1. Most of the __oxia/ keys can be deserialized, the notifications are the special cases?
  2. there's nothing currently to prevent a client from inserting a key such as __oxia/notifications/0 which ends up in this "non-scannable" range.

mauricebarnum avatar Apr 26 '25 04:04 mauricebarnum