-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StringPartitionKeyComponent limits the key length to 100 chars #63
Comments
@chetanmeh thanks for reporting this. We have a fix for this, which should get released along some other improvements in a week or so. We are code complete, just final review, testing. |
@moderakh Good to know that its under fix. Just to unblock myself for now would it be fine to just bump the limit locally assuming the limit for PartitionKey is >= 255 or there is more to this issue |
@chetanmeh no. that won't work. |
Thanks for confirming. Would then look for next release |
addressed in 2.1.0. added unit test: |
@moderakh Should the test create key with length 255 as thats the max limit. So far keys upto 100 work as expected as that was the earlier limit in |
Ignore the previous comment. Now see that test case was building with 2-3 chars per iteration. Also looks like 255 limit is only for So it works fine now !! |
StringPartitionKeyComponent
truncates the key to 100 chars.azure-cosmosdb-java/sdk/src/main/java/com/microsoft/azure/cosmosdb/internal/routing/StringPartitionKeyComponent.java
Line 34 in 17937b1
Per docs the maximum length for
id
field is 255 chars. However I was not able to find any documented limit for partition key. Closest reference found here mentionsCan this limit in
StringPartitionKeyComponent
be set to 255 at least? Due to current truncation I get errorPartitionKey extracted from document doesn't match the one specified in the header
as theid
field in document being added has length say 120 chars while one passed in header is truncated to 100.The text was updated successfully, but these errors were encountered: