Do we have a constraint on the length of key in KVM

rovyas
Participant I

I was creating some entries in KVM. When I tried to create the entry as pasted below

{ "name" : "MIDMapper", "entry" : [ { "name" : "0", "value" : "0,0" } ] }

I got a following response

{ "code" : "keyvaluemap.service.keyvaluemap_entry_name_invalid", "message" : "KeyValueMap entry name 0 is invalid", "contexts" : [ ] }

The funny part is if I am setting the key as 00. I am able to create the entry in KVM successfully.

So is there any constraint on the length of key

Solved Solved
0 7 953
1 ACCEPTED SOLUTION

Not applicable

Indeed the key is required to be at least two characters conforming to the regex:

"\\b[A-Z0-9._\\-$ ][^/]+$"

View solution in original post

7 REPLIES 7

Dear @rovyas,

Yes, There is a limit. A key value map has a 15 MB limit. Writing to the map may fail close to or beyond this limit. If the amount of data might grow beyond 15 MB, be sure to use the ExpiryTimeInSecs element to expire entries before exceeding the limit. Please check documentation here. It's recently updated.

It's not advised to store large amount of Data in KVM due to latency & other performance related issues. If not used correctly, say if it is used to store tremendously large data, then it could have an implication on the runtime traffic.

Cheers,

Anil Sagar

@Anil Sagar - AFAIK ExpiryTimeInSecs is not working for KVM contrary to the docs. Are you 100% on this?

Not sure @Ozan Seymen , I will give it a try and let you know. If it's not working then we might need to update docs team to fix the same.

Cheers,

Anil Sagar

@Floyd Jones regarding docs

The ExpiryTimeInSecs determines how often Edge refreshes the value from the underlying store. The value is not deleted unless "Remove" operation is made through policy or management API.

Not applicable

Indeed the key is required to be at least two characters conforming to the regex:

"\\b[A-Z0-9._\\-$ ][^/]+$"

Nice info @DavidAllen