-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
MongoDB schema creation fails in AWS DocumentDB due to overly-long index name #788
Comments
ok, consider contributing a PR |
PR is opened, however i just learned that this index isn't compatible with DocumentDB anyway, as it does not yet support compound indexes with multiple array fields. Amazon's docs seem to imply that this feature is coming, so maybe it's not worth addressing this issue until support is added. I can close the PR and perhaps follow up later if you prefer. |
#788 Explicitly set name for MongoDB snapshot commit property index
PR is merged. The index on commitProperties is quite important but maybe we can start with DocumentDB experimental support, so without this index in the first place. |
released in 5.2.4 as experimental support |
Hello,
When using
MongoRepository
with AWS DocumentDB,MongoSchemaManager.ensureSchema()
fails to create the compound index ofcommitMetadata.properties.key
andcommitMetadata.properties.value
in jv_snapshots, because the autogenerated index name is too long. Both MongoDB and DocumentDB limit the fully-qualified index name (<db>.<col>.$<index>
) to under 128 characters, but DocumentDB places the additional restriction that the unqualified index name (<col>.$<index>
) must be under 64 characters. In this case, the complete autogenerated index name,jv_snapshots.$commitMetadata.properties.key_1_commitMetadata.properties.value_1
, exceeds that limit. This issue also occurs in MongoDB, if using an unusually long DB name.Perhaps
MongoSchemaManager.ensureSchema()
could explicitly set a shorter index name?Thanks!
The text was updated successfully, but these errors were encountered: