We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! I have this config
{ok, _MasterPID} = mongo_api:connect( Seed, Hosts, [{register, ?MASTER}, {max_overflow, MaxOverMaster}, {pool_size, PoolSizeMaster}, {rp_mode, primaryPreferred}], [{database, Database}, {auth_source, AuthSource}| Credentials] ), PoolSizeSlave = proplists:get_value(pool_size_slave, Config), {ok, _SlavePID} = mongo_api:connect( Seed, Hosts, [{register, ?SLAVE}, {pool_size, PoolSizeSlave}, {rp_mode, secondaryPreferred}], [{database, Database}, {auth_source, AuthSource}, {r_mode, slave_ok} | Credentials] ),
It works fine when I write and read from master, but the errors appears when I try to read from Secondary
{<<"$clusterTime">> => #{<<"clusterTime">> => {mongostamp,1,1723717031}, <<"signature">> => #{<<"hash">> => {bin,bin, <<213,241,230,36,90,99,48,217,38,182,91,152,212,36,159, 36,148,32,228,...>>}, <<"keyId">> => 7395509061770280966}}, <<"code">> => 13435, <<"codeName">> => <<"NotPrimaryNoSecondaryOk">>, <<"errmsg">> => <<"not master and slaveOk=false">>,
What am I doing incorrect?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi!
I have this config
It works fine when I write and read from master, but the errors appears when I try to read from Secondary
{<<"$clusterTime">> =>
#{<<"clusterTime">> => {mongostamp,1,1723717031},
<<"signature">> =>
#{<<"hash">> =>
{bin,bin,
<<213,241,230,36,90,99,48,217,38,182,91,152,212,36,159,
36,148,32,228,...>>},
<<"keyId">> => 7395509061770280966}},
<<"code">> => 13435,
<<"codeName">> => <<"NotPrimaryNoSecondaryOk">>,
<<"errmsg">> => <<"not master and slaveOk=false">>,
What am I doing incorrect?
The text was updated successfully, but these errors were encountered: