"deletedCount" is the number of records on the free list (and is
always at least 1). So, if you inserted five docs and deleted two,
"deleted" would be 3 (1+2). If you then inserted a smaller record
that could fit in the free space left by deleting a record, "deleted"
will go down to 2. E.g.:
> db.foo.insert({_id:1,"foo":"bar"})
> db.foo.insert({_id:2,"foo":"bar"})
> db.foo.insert({_id:3,"foo":"bar"})
> db.foo.insert({_id:4,"foo":"bar"})
> db.foo.insert({_id:5,"foo":"bar"})
> db.foo.validate().deletedCount
1
> db.foo.remove({_id:1})
> db.foo.remove({_id:2})
> db.foo.validate().deletedCount
3
> db.foo.insert({_id:2})
> db.foo.validate().deletedCount
2
On Oct 17, 11:21 pm, Santosh c <
santoshc...@gmail.com> wrote:
> Thanks for the response. I remember watching the server log carefully while
> the repair was going on (/var/log/mongodb/mongod.log) and I didnt see
> anything that said "remove", or at least I dont remember now.
>
> I ran validate on one collection now, although it says ok:1 and valid:true,
> it also says deleted: n: <n>, size: <size>, what does this represent? The
> doc athttp://
www.mongodb.org/display/DOCS/Validate+Commanddoesnt explain
> the result parameters.
>
> thanks again.
>