|
This is indeed not reproducible. Re-closing.
|
|
The call stack in the description shows that the error is happening during the processing of the setProfilingLevel command – I don't yet see how causing something to be profiled after the fact will cause this issue.
dan@10gen.com can you give more details on the repro?
|
|
You only can repro by causing something to be inserted into the profile collection.
name:SECONDARY> db.serverBuildInfo()
|
{
|
"version" : "2.5.1-pre-",
|
"gitVersion" : "fb84a8e047ead09d4a457c6e81710d5e0a4e79b5",
|
"sysInfo" : "Darwin crucible-2.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49",
|
"loaderFlags" : "-fPIC -pthread -Wl,-bind_at_load",
|
"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe -O3 -Wno-unused-function -Wno-deprecated-declarations -mmacosx-version-min=10.6",
|
"allocator" : "tcmalloc",
|
"versionArray" : [
|
2,
|
5,
|
1,
|
-100
|
],
|
"javascriptEngine" : "V8",
|
"bits" : 64,
|
"debug" : false,
|
"maxBsonObjectSize" : 16777216,
|
"ok" : 1
|
}
|
name:SECONDARY> db.setProfilingLevel(2)
|
{ "was" : 0, "slowms" : 100, "ok" : 1 }
|
name:SECONDARY> db.foo.find()
|
error: { "$err" : "not master and slaveOk=false", "code" : 13435 }
|
|
|
I couldn't reproduce this (even on 2.0.0), it seemed to just work. I got back
{ "was" : 0, "slowms" : 100, "ok" : 1 }
.
|
|
After further discussion, it looks like it might actually be not that hard to fix this and allow profiling to be turned on without being in PRIMARY state.
|
|
For now, i think it should error out more gracefully. Rather large change to change where profiling data goes.
|
|
What should be the behavior here – profiling should go into a non-replicated collection, for replica sets? Or should it simply refuse to turn on with a better error message?
|
Generated at Thu Feb 08 03:04:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.