Skip to content

CosmosDbPartitionedStorage should support a custom user provided suffix for id #2766

Closed
microsoft/botbuilder-python
#487
@christopheranderson

Description

@christopheranderson

Is your feature request related to a problem? Please describe.

There are scenarios where the same collection is used for multiple bots. In those scenarios, to be sure there is no conflicts for data, it's required to extend the Storage provider to give a custom id/etc. (usually botid or something similar).

Describe the solution you'd like

CosmosDbPartitionedStorage should accept a custom suffix setting that it appends to ids to avoid conflicts. It's up to the user to make sure two different bots, using the same cosmos, don't use the same suffix.

Note that we should use suffix, not prefix, because we should make the beginning of the string as unique as possible for hashing reasons.

Describe alternatives you've considered

Could go with a more complex lambda model where we pass the id transformation on to the user. This has additional functional advantages, but they are unrelated to the current problem facing multitenancy of the same Cosmos Container.

Additional context

This is an ask from ABS.

[enhancement]

Metadata

Metadata

Assignees

Labels

P1Painful if we don't fix, won't block releasingR7Release 7 - December 10th, 2019

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions