Skip to content

Commit

Permalink
fix(core): update read concern to avoid sync issues (#4649)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi authored Nov 7, 2024
1 parent 38b5695 commit 1cf7181
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions core/api/src/services/mongodb/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ const DEFAULT_MONGODB_OPTIONS: mongoose.ConnectOptions = {
retryWrites: true,
writeConcern: {
w: "majority", // Wait for majority acknowledgment
j: true, // Wait for journal commit
wtimeout: 10000, // Write timeout
},

retryReads: true,
maxStalenessSeconds: 90,
readPreference: "primaryPreferred", // Prefer primary but allow secondary reads
readConcern: { level: "majority" }, // Read from majority-committed data
} as const

export const ledgerAdmin = lazyLoadLedgerAdmin({
Expand Down

0 comments on commit 1cf7181

Please sign in to comment.