Skip to content
New issue

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

feat(DB): Introduce DB write concern env var for createStatements (LLC-2389) #896

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lucuilearningpool
Copy link
Contributor

Closes LLC-2389.

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Patch coverage: 87.50% and project coverage change: -0.01 ⚠️

Comparison is base (7e0f319) 93.92% compared to head (6484be4) 93.91%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #896      +/-   ##
==========================================
- Coverage   93.92%   93.91%   -0.01%     
==========================================
  Files         655      655              
  Lines        7146     7152       +6     
  Branches      795      796       +1     
==========================================
+ Hits         6712     6717       +5     
  Misses        314      314              
- Partials      120      121       +1     
Impacted Files Coverage Δ
...nts/repo/modelsRepo/utils/mongoModels/constants.ts 85.71% <75.00%> (-14.29%) ⬇️
...atements/repo/modelsRepo/createStatements/mongo.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +6 to +7

const WRITE_CONCERN_DEFAULT = 3;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MongoDB's default is majority and here our default is 3. This would create behavioural change immediately upon deployment.

@@ -22,7 +26,11 @@ export default (config: FacadeConfig): Signature => {
});

const collection = (await config.db()).collection(STATEMENTS_COLLECTION_NAME);
await collection.insertMany(documents);
console.time('STATEMENT INSERTION');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logs are for measurements in the QA process only and will be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants