Skip to content
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

Updated Cosmos DB Partitioned following feedback #2684

Merged
merged 5 commits into from
Oct 10, 2019

Conversation

garypretty
Copy link
Contributor

  • Amends container creation to disable indexing
  • Switch to using ReadItemAsync instead of Query
  • Switch PartitionKey to use Id instead of RealId

Use Id for partition key. Use ReadItemAsync instead of Query.
Removed redundant Throughput option - we will create container with default settings and allow user to amend in Azure.
Copy link

@christopheranderson christopheranderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cosmos specific logic looks good. 👍

FYI - it looks like you also stopped passing a throughput, so you'll get whatever the SDK thinks the default ought to be. That's probably fine, but you didn't mention it in your change notes, so wanted to call it out as it is potentially a behavioral change.

@garypretty
Copy link
Contributor Author

Thanks @christopheranderson - I couldn't see a way of specifying the throughput when defining my container. I don't believe this is an issue anyway as the user can manage afterwards in Azure if needed and I will ensure it is added to the sample comments as well. Cheers again!

_cosmosDbStorageOptions.ContainerThroughput)
.DefineContainer(_cosmosDbStorageOptions.ContainerId, DocumentStoreItem.PartitionKeyPath)
.WithIndexingPolicy().WithAutomaticIndexing(false).WithIndexingMode(IndexingMode.None).Attach()
.CreateIfNotExistsAsync()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@j82w Ah! Thank you! I will update.

@mdrichardson
Copy link
Contributor

@gary Should the tests include not throwing when deleting non-existing item? I'm not sure if it throws a 404 on the dotnet side, but I know it does in Node.

@garypretty
Copy link
Contributor Author

@mdrichardson ill check. Good shout I think. I'll add a test. We have a read unknown so we should probably have a delete unknown test too.

@coveralls
Copy link
Collaborator

@fuselabs
Copy link
Collaborator

✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.AI.Luis.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.AI.QnA.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.ApplicationInsights.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.Azure.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.Dialogs.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.TemplateManager.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Configuration.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Connector.dll compared against version 4.5.3
✔️ No Binary Compatibility issues for Microsoft.Bot.Schema.dll compared against version 4.5.3

@garypretty garypretty merged commit b2dec6b into master Oct 10, 2019
@cleemullins cleemullins deleted the gary/cosmosDbPartitionedFeedback branch October 24, 2019 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants