[CSHARP-1617] Legacy Driver Issue with Update, Remove. Created: 01/Apr/16  Updated: 05/Apr/19  Resolved: 22/Dec/16

Status: Closed
Project: C# Driver
Component/s: Connectivity
Affects Version/s: 2.2.3
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Sreehari Mogallapalli Assignee: Craig Wilson
Resolution: Done Votes: 0
Labels: question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We are currently on v 1.11 and planning to upgrade to 2.2.3. As we have lot of custom code written in our application, we wanted to stick with legacy c# driver. We are noticing the following error with update or remove calls.

Any help or direction in regards to this issue is greatly appreciated.

{ "$err" : "Unable to execute query: error processing query: ns=test-ads-fast.field limit=0 skip=0\nTree: orgId == 2000\nSort: {}\nProj: {}\n No query solutions", "code" : 17007 }).



 Comments   
Comment by Craig Wilson [ 18/Aug/16 ]

Hari,

Do you have any further information? Did you get it working?

Craig

Comment by Craig Wilson [ 05/Apr/16 ]

Thanks for the reply. As requested before, could you provide:

1) The list of indexes on the collection having issues.
2) The generated query. You can get this from the profiler.
3) Since you are having issues with a simple _id query, could you provide the logs from the mongod when the query is run?

Craig

Comment by Sreehari Mogallapalli [ 04/Apr/16 ]

This has been working well with 1.11 and no issues. We do have index on the fields orgId and fieldId.

I am getting the similar exception with the following code

_mongoCollection.Remove(Query.EQ("_id", id));

Hari.M

Comment by Craig Wilson [ 01/Apr/16 ]

Ok, so that is pretty standard code. This error message comes back when --notablescan is turned on at the server and a predicate is missing the index. Could you provide a list of the indexes that you have on the collection? Also, it'd be great to know what query is actually getting generated from the driver so we can compare it to the indexes you have. Could you turn on the profiler while you run the query so we can see what the generated query is?

Craig

Comment by Sreehari Mogallapalli [ 01/Apr/16 ]

var client = new MongoClient(settings);

_mongoDatabase = client.GetServer().GetDatabase(connectionInfo.DBName);

This is where it throws an exception:

_mongoDatabase.GetCollection<T>(collectionName)

Collection.AsQueryable().Where(f => f.FieldId == fieldId && f.OrgId == orgId);

Comment by Craig Wilson [ 01/Apr/16 ]

Hi Sreehari,

Sorry you are having some issues. Would you please provide a code snippet that is causing the error you are seeing?

Craig

Generated at Wed Feb 07 21:40:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.