Skip to content

Commit

Permalink
Changing read preference
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark2307 committed Dec 6, 2024
1 parent 5acc06f commit 3f36c8d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2248,7 +2248,7 @@ public void run() {
ReadPreference readPreference = ReadPreference.primary();
WriteConcern writeConcern = WriteConcern.ACKNOWLEDGED;
if (runJobFunctions || DashboardMode.isSaasDeployment()) {
readPreference = ReadPreference.secondary();
readPreference = ReadPreference.primary();
writeConcern = WriteConcern.W1;
}
DaoInit.init(new ConnectionString(mongoURI), readPreference, writeConcern);
Expand Down

0 comments on commit 3f36c8d

Please sign in to comment.