[SERVER-15216] remove() should ignore notablescan Created: 11/Sep/14  Updated: 10/Dec/14  Resolved: 12/Sep/14

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 2.6.4
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Nic Cottrell (Personal) Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

db.Example.remove(

{"wordCount":0}

) gives

WriteResult({
	"nRemoved" : 0,
	"writeError" : {
		"code" : 65,
		"errmsg" : "multiple errors for op : error processing query: ns=jerome5.Example limit=0 skip=0\nTree: wordCount == 0.0\nSort: {}\nProj: {}\n No query solutions :: and :: error processing query: ns=jerome5.Example limit=0 skip=0\nTree: wordCount == 0.0\nSort: {}\nProj: {}\n No query solutions :: and :: error processing query: ns=jerome5.Example limit=0 skip=0\nTree: wordCount == 0.0\nSort: {}\nProj: {}\n No query solutions"
	}
})

Maybe remove should be an exception to the notablescan setting?



 Comments   
Comment by Nic Cottrell (Personal) [ 15/Sep/14 ]

What about an explicity

{force: true}

option or

{notablescan:false}

?

Comment by Eric Milkie [ 12/Sep/14 ]

"notablescan" does make certain operations impossible; running "remove()" with a query for a non-indexed field is one such operation.

I don't think it's prudent to have all the otherwise-impossible operations ignore "notablescan", but neither does making an arbitrary exception for this one operation.

Comment by Nic Cottrell (Personal) [ 12/Sep/14 ]

Well, I was doing some cleanup on the collection, deleting invalid objects which were inserting before a new constraint was added in the application. I ended up having to add an index on this field to cleanup then remove it again afterwards. Not a bit problem I guess, but for very large collections which is much more load than a full tablescan, right?

Comment by Eric Milkie [ 11/Sep/14 ]

Hi Nic,
Can you give a bit more color as to the reasons why remove() should ignore notablescan?

Generated at Thu Feb 08 03:37:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.