nats-server icon indicating copy to clipboard operation
nats-server copied to clipboard

Max History Per Key hard limit in KeyValue store

Open andrea-tomassi opened this issue 2 years ago • 1 comments

Feature Request

According to current specs "Max History Per Key cannot be more than 64".

Is there any tech constraint for such a low number?

Use Case:

Any with a need for an higher history

Proposed Change:

unlock the max-history value and allow reading recent history only by selecting the last number of items/by date e.g. nc.keyValue(storeName).history("store-name", 10) should return the lastest 10 items from history

Who Benefits From The Change(s)?

Alternative Approaches

andrea-tomassi avatar Sep 10 '22 23:09 andrea-tomassi

I think this is a Go client, and other client limitation, not a server one IIRC.

derekcollison avatar Sep 11 '22 00:09 derekcollison

Believe Go client relaxed this.

derekcollison avatar Jan 06 '23 16:01 derekcollison

This is still the case for both NATS client and server libraries 🤔

solita-cristian avatar Aug 11 '23 06:08 solita-cristian

This is not enforced by the server, this is a client side thing. @Jarema

derekcollison avatar Aug 11 '23 15:08 derekcollison

This is being discussed here https://github.com/nats-io/nats.go/issues/1365 and as @derekcollison mentioned, we only need to change it on client side. This ticket should remain closed.

Jarema avatar Aug 11 '23 15:08 Jarema