I think I know where is the problem. Delete returns deleted data. I tried a simpler example which was fixed when I explicitly used Do(Delete(…), true) to return nothing.
There is a 16MB limit on transactions, which might be where 16777216 is coming from. This is hinted here, in Data Manager docs. Maybe somewhere else, but I can’t find it. I dug this up from conversations slack.
Also,
There is definitely something wrong with the Delete docs.
You hid your original question by updating it with your answer. What you are saying to readers is that this code block is not working. But later you suggest that this is actually the code that does work. This was very confusing. It would be better to provide the new code in a later post and mark it as the solution. You did explain you figured it out, but why not put the working code there?
Also, what is FMAP? Or selectInput? When I first looked at this question, I read the original post first, and my instincts are to respond, “I cannot say with any certainty what is wrong until you explain what these external functions do”. It does look like your question is answered, and the transaction limit is recorded for everyone, so no need to dwell on this part. But it would be helpful if you can sanitize your code a little more when uploading to questions, because it is most likely other readers will not be familiar with you more bespoke library calls.
Yes it should, and I’m sorry for the confusion. This limit was actually pushed in hot to fix an outage which is why the docs are lagging a little, we normally wouldn’t push a breaking update without updating the docs first.
So I hit that error again. I am just deleting a bunch of documents, which are quite large. Just because delete returns deleted data, a limit is exceeded.
How we can delete documents without delete returning data?
@ben It’s impossible to delete a bunch of big documents because the delete function always returns deleted data that exceeds a limit. Is this correct behavior?
Hi Daniel - Thanks for your patience on this issue. I’d like to be sure clarify that the limit your hitting isn’t due to the size of number of documents returned, but rather the size of the transaction object which needs to be committed to the log, necessary to enforce the consistency guarantee of the database. In other words, the size of the transaction would exceed the limits whether or not the deleted document are returned or not.
Taking a look at the operation provided above, you’d like to perform here, is it the case that you’d like to drop all the documents in a collection with out deleting the collection itself. Is that correct?