Solved Solved

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 734
1 ACCEPTED SOLUTION
Solved Solved

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

Solved Solved
2 1 0
7 REPLIES 7

anilsr
Staff

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

0 4 0

ozanseymen

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

0 2 0

anilsr

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

0 1 0

birute

@Floyd Jones regarding docs

0 0 0

madhans

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.

1 0 0
Solved Solved

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

Solved Solved
2 1 1

Not applicable

Nice info @DavidAllen

0 0 0
Top Labels in this Space
Top Solution Authors