Practice Test question is incorrect

One of the practice test question gives one of the choices as rs.setSlaveOk() and it marks it as one of the correct answers??

From my understanding, the shell helper here should be rs.slaveOk() and not rs.setSlaveOk()

On doing some research, I can see that rs.slaveOk() internally calls db.getMongo().setSlaveOk()

But, as such, there is no command called rs.setSlaveOk().

Can you please clarify this?

Can anybody from the MongoDB Univ. TA team help with this please?

Hi @PuneetC,

I apologise for the late reply.

It will be really helpful if you can share the practice exam question along with the options provided.

Thanks,
Sonali

Below is the question

The answer considers Choice 2 to be correct, which I doubt, as explained in my initial post…

Hi @PuneetC,

Thanks for notifying the issue!!

In this case, rs.setSlaveOk() needs to be replaced with rs.slaveOk().
I will definitely forward this issue to the concerned team and get is resolved as soon as possible.

Thanks,
Sonali

Perfect!! Thank you @Sonali_Mamgain