top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

MongoDB: What is a pinned cursor? what behaviour can produce a pinned cursor?

+1 vote
1,366 views
MongoDB: What is a pinned cursor? what behaviour can produce a pinned cursor?
posted Feb 13, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

A pinned cursor is an internal implementation detail where the pinned flag denotes an open cursor that is actively in use and should not be deleted.
Cursors are generally pinned for a short period of time. Example: a find() or getMore() operation will pin a cursor to prevent it from being deleted while fetching a next batch of results, and unpin the cursor when results are returned.

answer Feb 26, 2016 by Shivam Kumar Pandey
Similar Questions
0 votes

I am new to mongodb. I am trying to do some aggregation operations like sum, avg, min.. on a collection. And I found that I can do it either using aggregation framework or cursor.forEach(). Which one to use? It will be better if someone explains how both works internally and give me some suggestions.

Thank you in advance

+1 vote

Can someone please explain the difference between db.serverStatus().metrics.cursor and db.serverStatus().wiredTiger.session with regards to open cursor count and open session count.?

I am seeing different values in these fields (specifically a high and increasing value for WiredTiger) and I want to be sure that I have been releasing cursors where necessary. I cannot see much information in the docs for WiredTiger.

+1 vote

I only want to enable client authentication when deploy a mongodb replica set, as dont want to use the --keyfile option. Cant find useful information relate to this scenario by google...

If yes, could you share some guide link if have?

...