[CSHARP-93] Stack overflow when calling DropAllIndexes Created: 05/Nov/10  Updated: 02/Apr/15  Resolved: 05/Nov/10

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 0.7
Fix Version/s: 0.9

Type: Bug Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Stack overflow when calling DropAllIndexes.



 Comments   
Comment by Robert Stam [ 05/Nov/10 ]

Implemented IndexExists.

Comment by ghostdog [ 05/Nov/10 ]

I agree 100% on #3, I was intellispelunking around for that method

Comment by Robert Stam [ 05/Nov/10 ]

Thinking about the exception on DropIndexByName, the options are:

1. You catch the exception and process or ignore it
2. We change DropIndexByName to ignore collection or index does not exist errors
3. We add an IndexExists method that you can call before calling DropIndexByName to check first whether the index exists or not

My only problem with #2 is that it hides errors due to typos in collection or index names.

Any preferences? My preference is for #3.

Comment by Robert Stam [ 05/Nov/10 ]

Regarding the error on DropIndexByName, the server is returning an error, so the driver is merely reporting the error it got from the server.

Comment by Robert Stam [ 05/Nov/10 ]

Fixed.

Comment by ghostdog [ 05/Nov/10 ]

As an aside, I also get an unhandled error calling DropIndexByName on an non-existent index, not sure if this is by design or not,

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