0

I was inspecting my mongodb performance by using db.currentOp(true), the mongo shell returned the following error message, but db.currentOp() works fine

yqdmj:PRIMARY> db.currentOp(true) 2015-03-31T16:01:06.383+0800 ReferenceError: PROC_UpdateUserCoupon is not defined 2015-03-31T16:01:06.384+0800 Error: 16722 ReferenceError: PROC_UpdateUserCoupon is not defined at src/mongo/shell/types.js:616

Actually, PROC_UpdateUserCoupon is a server-side js that I defined, and I can find it in db.system.js, I don't know what is exactly going on with db.currentOp(true), I tried using db.currentOp() without passing parameter, it works fine, how can I fix it?

Jonathan
  • 33
  • 5
  • Do you have an instance of this function running when you call `currentOp`? Can you show the code for `PROC_UpdateUserCoupon` and an example of what it does? My first thought is that this looks like a problem with the shell and I'd like to see if I can reproduce it. – wdberkeley Mar 31 '15 at 14:35
  • Hi, @wdberkeley, the clients will call this function every now and then, but it doesn't seem to be the problem, b/c I get the same error message every time I call `currentOp(true)`. I also got a mongo server running the same code and data for testing and developing, it doesn't have this problem. Is there any chance I mistakenly changed the `src/mongo/shell/types.js` instance – Jonathan Apr 01 '15 at 11:22

0 Answers0