fork 40 个线程,每个线程跑 100 次报错 SEVERE: ThreadPool27>>Command failed with error 50738 (Location50738): 'Cannot run getMore on cursor 6355812681,

测试用例如下图:
imagepng
注意事项:
(1)fork 40 个线程;
(2)每个线程运行 100 次;
(3)数据库测试表数据在 1w 以上;
(4)mongo_shell 指定返回游标
(5)skip 一定要跳过 200 条以上(如果低于不出现);
(6)mongodb 驱动包是支持 mongodb 连接池的包
(7)集算器的并发数量一定不要是 1,因为集算器默认是这个值,你不修改还是单线程,不能重现这个问题

报错详细信息如下:
Command failed with error 50738 (Location50738): ‘Cannot run getMore on cursor 6355812681, which was created in session f1984606-6136-4a0a-9b90-433df2837a4c - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=, in session d0422cf7-0eef-4044-8755-bfdfcf13cbb8 - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=’ on server 127.0.0.1:27017. The full response is {“ok”: 0.0, “errmsg”: “Cannot run getMore on cursor 6355812681, which was created in session f1984606-6136-4a0a-9b90-433df2837a4c - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=, in session d0422cf7-0eef-4044-8755-bfdfcf13cbb8 - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=”, “code”: 50738, “codeName”: “Location50738”}

脚本附件如下链接
p2rar

mongo 返回游标(多次调用 getMore)这块不好使,并发情况下。单线程没有问题,不用测试。