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(mongo): support migrate virtualKey #33

Merged
merged 7 commits into from
Aug 21, 2023

Conversation

Hieuzest
Copy link
Contributor

@Hieuzest Hieuzest commented Aug 2, 2023

Support auto migrating optimizeIndex setting in prepare().
Store table preference in _fields.virtual, cause i don't want to create another meta table.
Support crash consistency, cause this migration can cost minutes for large database.

Also: fix Model.extend when Model::unique will grow everytime plugin-database reload.
(which cause _createIndexes to create duplicate Indexes)

PS. No test available cause I just don't know how and where to create tests for this specific case. Multi threading fails my attempts everytime.

@Hieuzest Hieuzest marked this pull request as ready for review August 2, 2023 10:45
@Hieuzest Hieuzest marked this pull request as draft August 2, 2023 10:46
@Hieuzest Hieuzest marked this pull request as ready for review August 2, 2023 11:06
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #33 (e29a09f) into master (ac75782) will increase coverage by 0.13%.
Report is 1 commits behind head on master.
The diff coverage is 98.48%.

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
+ Coverage   97.90%   98.03%   +0.13%     
==========================================
  Files          23       23              
  Lines        4585     4637      +52     
  Branches     1090     1134      +44     
==========================================
+ Hits         4489     4546      +57     
+ Misses         96       91       -5     
Files Changed Coverage Δ
packages/mongo/src/index.ts 98.06% <98.46%> (+1.16%) ⬆️
packages/core/src/model.ts 96.93% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Hieuzest Hieuzest marked this pull request as draft August 2, 2023 11:24
add auto detecting preference for rebuilding _fields table

Signed-off-by: Hieuzest <[email protected]>
@Hieuzest Hieuzest marked this pull request as ready for review August 2, 2023 12:27
@shigma shigma merged commit 4e4472f into cordiverse:master Aug 21, 2023
@Hieuzest Hieuzest deleted the dev-mongo branch August 27, 2023 20:02
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.

2 participants