azure-cosmosdb

TypeLoadException with DocumentClient on Visual Studio Mac

浪子不回头ぞ 提交于 2019-12-12 04:12:51
问题 I downloaded the getting started sample app from Azure Cosmos DB and am getting the following error with Visual Studio Mac System.TypeLoadException: Could not resolve type with token 010000f6 (from typeref, class/assembly System.Diagnostics.Eventing.EventProviderTraceListener, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Azure.Documents.Client.DocumentClient.Initialize (System.Uri serviceEndpoint, Microsoft.Azure.Documents.Client

PartitionKey extracted from document doesn't match the one specified in the header

佐手、 提交于 2019-12-12 03:58:47
问题 I have created a partitioned collection on a long field ( playerId ) and also added a hash index on that field (DataType.Number). When I insert records most of the time it works, but sometimes it gives me a PartitionKey extracted from document doesn't match the one specified in the header . After I tested this in the Azure Data Explorer I found out there's a rounding problem with long numbers. If I insert 183548146777950021 through Data Explorer it will save it, but then return that same

Bluebird Promise Retry DocumentDB request

不羁岁月 提交于 2019-12-12 02:54:35
问题 I'm trying to rewrite a retry function with callbacks into a Bluebird promise one but can't seem to get my head around the correct way of doing this. At the bottom is the working callback function for retrying Azure DocumentDB when limit is met. I'm trying to use promises in the function itself but it returns before reaching the "Then". Any hints on how to tackle this or if performance is affected by using catch this way would be appreciated. Thank you! "readDocRetry": function(id, retries) {

How to use 'id' when using DocumentDB via MongDB API in Spring DATA?

倖福魔咒の 提交于 2019-12-12 02:07:38
问题 I have used both the ways of mapping _id as described in the Spring Docs here. using @Id annotation having a field with name id without any annotation in my previous project where we used MongoDB as database and Spring Data for DAO operations. It worked without any problem for both String a well as for BigInteger . Now we are using DocumentDB with MongoDB API(as Spring Data does not support DocumentDB). I am able to use all the Spring Data methods, but I am not able to use custom id. Below is

How to extend the Expiry of a Document DB REST API Resource Token

天涯浪子 提交于 2019-12-12 01:20:01
问题 I am monitoring the entries in a document database collection by means of REST API from a front end application. The RESP API queries for a list of documents in the collection based on certain filter criteria. The token for authenticating the REST API call is generated by means of the .NET SDK. Here's the code snippet used for the token generation : string GenerateAuthToken(string verb, string resourceId, string resourceType, string key, string keyType, string tokenVersion) { var hmacSha256 =

Querying Azure DocumentDB with ExecuteNextAsync returns fewer than MaxItemCount

江枫思渺然 提交于 2019-12-12 00:34:52
问题 I am querying an Azure DocumentDB collection using the FeedOption MaxItemCount to set the "page" size, and IDocumentQuery<T>::ExecuteNextAsync<T>() . When this is called with small values, say <100, against a set of 10,000 documents I consistently get back the number of objects I set as the limit. However, when I execute with larger MaxItemCount values, say 500, I get back all manner of results, but never more than the MaxItemCount. Now, I appreciate that MaxItemCount is a "max item count"

Azure Cosomos DB stored procedure response size too large

安稳与你 提交于 2019-12-11 19:49:28
问题 I have Sensor IoT Data which is getting stored in cosmos DB . I need minute level aggregation of data for last 30 days to show in webapp. So i have written stored procedure for it to do group by and aggregations of sensors data. it is giving following error Failed to execute stored procedure something for collection newData: {"code":400,"body":"{\"code\":\"BadRequest\",\"message\":\"Message: {\\"Errors\\":[\\"Encountered exception while executing function. Exception = Error: Resulting message

CosmosDB C# SDK ProyUrl missing

拈花ヽ惹草 提交于 2019-12-11 19:37:09
问题 I am working on a containerized micro-services project (docker) in .NET Core targeting Azure. So we are using Azure Cosmos DB, and the C# Cosmos DB SDK (v2.4 since v3 is only in preview) for the CoreSql Api. During development, I am behind a proxy, so I need to specify the proxy url for everything going outside. It works fine with HttpClientHandler for any HttpClient. Using Cosmos DB SDK, I however don't see how to set this up on my DocumentClient. In the Azure Node SDK, I see I could just

PartitionKey extracted from document doesn't match the one specified in the header on CreateItemAsync

孤街醉人 提交于 2019-12-11 18:48:26
问题 I have a bit of a problem using Microsoft.Azure.Cosmos version 3.2.0, upon running await this.Container.CreateItemAsync<LogEntity>(logEntity, new PartitionKey("anythingIPutHere")); it throws Microsoft.Azure.Cosmos.CosmosException HResult=0x80131500 Message=Response status code does not indicate success: 400 Substatus: 1001 Reason: (Message: {"Errors":["PartitionKey extracted from document doesn't match the one specified in the header"]} but if I put, await this.Container.CreateItemAsync

Gremlin query is returning no results when part of the query returns nothing

佐手、 提交于 2019-12-11 17:57:17
问题 I have a gremlin query which finds the vertices I want to archive but it is returning an empty array. My graph is laid out in a way where a vertex can have multiple parents and children. When a vertex is archived then it needs to archive all of it's affected descendants that would be 'orphaned' by this process. If any of the descendants have a path back to a central vertex then it shouldn't archive it because it won't be 'orphaned' g.V(itemId) // Find the item to delete. .union( // Start a