Am 30.11.2012 01:15, schrieb Ekyo:

(...)
ensureIndex only queries the collection in the first place before trying to insert the index in it
to avoid useless insertions.

Thanks for the info, I've committed a simple implementation to master. It seems like the DB already
checks if the index exists and does not reindex, so an additional query might not be necessary... or
do you see a concrete reason for this?

Btw. is there some kind of authoritative source for this kind of information? I just found the low
level protocol information and high level client information, as well as some of those internal
things scattered around. But most of the stuff either had to be reverse engineered by looking at the
log output of the server or by looking at other client's source code.

For errors related to indexes I'll need to look further but my guess is that the errors would be in
system.indexes and we only currently check for errors in the current collection.

The error checking code was generally broken. I've fixed it and indexing errors are now reported as
an exception.