Skip to content

Commit

Permalink
add todo about read/write concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
gubser committed Jun 26, 2016
1 parent 988f91b commit 2110e67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ptocore/coreconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ def __init__(self, program_name: str, fps):
doc_load = json.load(fp)
dpath.util.merge(doc, doc_load)

# set write and read concern according to the MongoDB 3.2 docs:
# > To ensure that a single thread can read its own writes, use "majority" read concern and
# > "majority" write concern against the primary of the replica set.
# TODO change this when server is started with `--enableMajorityReadConcern`
#self.mongo = MongoClient(doc[program_name]['mongo_uri'], w="majority", readConcernLevel="majority")
self.mongo = MongoClient(doc[program_name]['mongo_uri'])

self.environment = doc['environment']
Expand Down

0 comments on commit 2110e67

Please sign in to comment.