I am experimenting with cl-mongo, and had some problems with db.next not producing any results. I was able to track down the issue to the incorrect handling of cursor ids in the loop in mongo-reply (protocol.lisp line 140). Cursor ids are 64bit, but are treated here as 32 bit. When I comment out the loop, and uncomment the nreverse-version in line 144-153, everything works fine. (There should also normally not be any noticeable performance benefit from using the loop over the nreverse variant.)
On a related note, I believe it would be useful if db.iterator would be exported from the cl-mongo package.
Hi,
I am experimenting with cl-mongo, and had some problems with db.next not producing any results. I was able to track down the issue to the incorrect handling of cursor ids in the loop in mongo-reply (protocol.lisp line 140). Cursor ids are 64bit, but are treated here as 32 bit. When I comment out the loop, and uncomment the nreverse-version in line 144-153, everything works fine. (There should also normally not be any noticeable performance benefit from using the loop over the nreverse variant.)
On a related note, I believe it would be useful if db.iterator would be exported from the cl-mongo package.