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

Implement createIndexes command #2244

Merged

Conversation

rumyantseva
Copy link
Contributor

@rumyantseva rumyantseva commented Mar 20, 2023

Description

Closes #1509.

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@rumyantseva rumyantseva self-assigned this Mar 20, 2023
@rumyantseva rumyantseva added the code/feature Some user-visible feature is not implemented yet label Mar 20, 2023
@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Merging #2244 (ce230c2) into main (b5f96c2) will decrease coverage by 7.70%.
The diff coverage is 75.38%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2244      +/-   ##
==========================================
- Coverage   71.53%   63.84%   -7.70%     
==========================================
  Files         381      381              
  Lines       17758    18001     +243     
==========================================
- Hits        12704    11492    -1212     
- Misses       4022     5626    +1604     
+ Partials     1032      883     -149     
Impacted Files Coverage Δ
internal/handlers/commonerrors/error.go 48.38% <ø> (ø)
internal/handlers/commonerrors/errorcode_string.go 80.00% <ø> (ø)
internal/handlers/pg/pgdb/collections.go 67.85% <0.00%> (ø)
internal/handlers/pg/pgdb/pool.go 57.42% <25.00%> (-1.34%) ⬇️
internal/handlers/pg/pgdb/indexes.go 75.43% <66.66%> (+3.21%) ⬆️
internal/handlers/pg/msg_createindexes.go 75.37% <74.59%> (+75.37%) ⬆️
internal/handlers/pg/pgdb/database_metadata.go 82.50% <90.69%> (+2.99%) ⬆️

... and 54 files with indirect coverage changes

Flag Coverage Δ
integration 56.28% <75.38%> (-11.11%) ⬇️
mongodb 4.97% <0.00%> (-0.07%) ⬇️
pg 56.20% <75.38%> (+0.44%) ⬆️
tigris ?
unit 27.01% <13.84%> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@rumyantseva rumyantseva changed the title Implement createIndex command Implement createIndexes command Mar 22, 2023
@mergify
Copy link
Contributor

mergify bot commented Mar 24, 2023

@rumyantseva this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Mar 24, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Mar 24, 2023
@rumyantseva rumyantseva requested a review from noisersup March 29, 2023 14:08
noisersup
noisersup previously approved these changes Mar 29, 2023
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

Thanks for applying changes. I've run postgresql with -c 'standard_conforming_strings=off'.
FerretDB seems to run, mongosh connection is initialized, but after any command we get an error, which is a good solution in my opinion! 👍

test> db.values.find()
MongoServerError: [msg_find.go:38 pg.(*Handler).MsgFind] [pg.go:130 pg.(*Handler).DBPool] pgdb.checkConnection: "standard_conforming_strings" is "off", want "on"

LGTM!

@rumyantseva
Copy link
Contributor Author

@noisersup, thanks for reviewing attentively! That's a critical check!

AlekSi
AlekSi previously approved these changes Mar 29, 2023
Copy link
Member

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

Docs LGTM

integration/indexes_compat_test.go Outdated Show resolved Hide resolved
integration/indexes_compat_test.go Show resolved Hide resolved
integration/indexes_compat_test.go Show resolved Hide resolved
integration/indexes_compat_test.go Outdated Show resolved Hide resolved
integration/indexes_compat_test.go Show resolved Hide resolved
internal/handlers/pg/msg_createindexes.go Outdated Show resolved Hide resolved
internal/handlers/pg/msg_createindexes.go Show resolved Hide resolved
internal/handlers/pg/msg_createindexes.go Show resolved Hide resolved
internal/handlers/pg/pgdb/indexes.go Outdated Show resolved Hide resolved
internal/handlers/pg/pgdb/indexes.go Outdated Show resolved Hide resolved
chilagrow
chilagrow previously approved these changes Mar 30, 2023
@chilagrow chilagrow dismissed stale reviews from AlekSi, noisersup, and themself via ce230c2 March 30, 2023 06:54
@AlekSi AlekSi added the do not merge PRs that should not be merged label Mar 30, 2023
@AlekSi
Copy link
Member

AlekSi commented Mar 30, 2023

@rumyantseva please do a final look on recent commits and remove do not merge PRs that should not be merged label

@rumyantseva rumyantseva removed the do not merge PRs that should not be merged label Mar 30, 2023
@rumyantseva rumyantseva merged commit ca6160d into FerretDB:main Mar 30, 2023
@rumyantseva rumyantseva deleted the issue-1509-simple-implementation branch March 30, 2023 08:05
efirs added a commit to tigrisdata-archive/ferretdb that referenced this pull request Apr 11, 2023
v1.0.0
https://github.com/FerretDB/FerretDB/releases/tag/v1.0.0
2023-04-03

We are delighted to announce the release of FerretDB 1.0 GA!

* Support `$sum` accumulator of `$group` aggregation by @chilagrow in FerretDB#2292
* Implement `createIndexes` command by @rumyantseva in FerretDB#2244
* Add basic `getMore` command by @AlekSi in FerretDB#2309
* Implement `dropIndexes` command by @chilagrow in FerretDB#2313
* Implement `$limit` aggregation pipeline stage by @noisersup in FerretDB#2270
* Add partial support for `collStats`, `dbStats` and `dataSize` by @AlekSi in FerretDB#2322
* Implement `$skip` aggregation pipeline stage by @w84thesun in FerretDB#2310
* Implement `$unwind` aggregation pipeline stage by @noisersup in FerretDB#2294
* Support `count` and `storageStats` fields in `$collStats` aggregation pipeline stage by @rumyantseva in FerretDB#2338

* Fix dot notation negative index errors by @w84thesun in FerretDB#2246
* Apply `skip` before `limit` by @AlekSi in FerretDB#2351

* Update supported command for `$sum` aggregation operator by @chilagrow in FerretDB#2318
* Add supported shells and GUIs images by @AlekSi in FerretDB#2323
* Publish FerretDB v0.9.4 blog post by @Fashander in FerretDB#2268
* Use dashes instead of underscores or spaces by @AlekSi in FerretDB#2329
* Update documentation sidebar by @Fashander in FerretDB#2347
* Update FerretDB descriptions by @AlekSi in FerretDB#2281
* Improve flags documentation by @AlekSi in FerretDB#2331
* Describe supported fields for `$collStats` aggregation stage by @rumyantseva in FerretDB#2352

* Use iterators for `sort`, `limit`, `skip`, and `projection` by @AlekSi in FerretDB#2254
* Bump dependencies by @AlekSi in FerretDB#2307
* Improve resource tracking by @AlekSi in FerretDB#2319
* Add tests for `find`'s and `count`'s `skip` argument by @w84thesun in FerretDB#2325
* Close iterator properly by @AlekSi in FerretDB#2333
* Improve large numbers initialization in test data by @noisersup in FerretDB#2324
* Ignore `unique` index option for now by @AlekSi in FerretDB#2350

All closed issues and pull requests: https://github.com/FerretDB/FerretDB/milestone/39?closed=1
All commits: FerretDB/FerretDB@v0.9.4...v1.0.0
efirs added a commit to tigrisdata-archive/ferretdb that referenced this pull request Apr 11, 2023
v1.0.0
https://github.com/FerretDB/FerretDB/releases/tag/v1.0.0
2023-04-03

We are delighted to announce the release of FerretDB 1.0 GA!

* Support `$sum` accumulator of `$group` aggregation by @chilagrow in FerretDB#2292
* Implement `createIndexes` command by @rumyantseva in FerretDB#2244
* Add basic `getMore` command by @AlekSi in FerretDB#2309
* Implement `dropIndexes` command by @chilagrow in FerretDB#2313
* Implement `$limit` aggregation pipeline stage by @noisersup in FerretDB#2270
* Add partial support for `collStats`, `dbStats` and `dataSize` by @AlekSi in FerretDB#2322
* Implement `$skip` aggregation pipeline stage by @w84thesun in FerretDB#2310
* Implement `$unwind` aggregation pipeline stage by @noisersup in FerretDB#2294
* Support `count` and `storageStats` fields in `$collStats` aggregation pipeline stage by @rumyantseva in FerretDB#2338

* Fix dot notation negative index errors by @w84thesun in FerretDB#2246
* Apply `skip` before `limit` by @AlekSi in FerretDB#2351

* Update supported command for `$sum` aggregation operator by @chilagrow in FerretDB#2318
* Add supported shells and GUIs images by @AlekSi in FerretDB#2323
* Publish FerretDB v0.9.4 blog post by @Fashander in FerretDB#2268
* Use dashes instead of underscores or spaces by @AlekSi in FerretDB#2329
* Update documentation sidebar by @Fashander in FerretDB#2347
* Update FerretDB descriptions by @AlekSi in FerretDB#2281
* Improve flags documentation by @AlekSi in FerretDB#2331
* Describe supported fields for `$collStats` aggregation stage by @rumyantseva in FerretDB#2352

* Use iterators for `sort`, `limit`, `skip`, and `projection` by @AlekSi in FerretDB#2254
* Bump dependencies by @AlekSi in FerretDB#2307
* Improve resource tracking by @AlekSi in FerretDB#2319
* Add tests for `find`'s and `count`'s `skip` argument by @w84thesun in FerretDB#2325
* Close iterator properly by @AlekSi in FerretDB#2333
* Improve large numbers initialization in test data by @noisersup in FerretDB#2324
* Ignore `unique` index option for now by @AlekSi in FerretDB#2350

All closed issues and pull requests: https://github.com/FerretDB/FerretDB/milestone/39?closed=1
All commits: FerretDB/FerretDB@v0.9.4...v1.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/feature Some user-visible feature is not implemented yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement createIndexes command
5 participants