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

Add basic getMore command #2309

Merged
merged 20 commits into from
Mar 30, 2023
Merged

Add basic getMore command #2309

merged 20 commits into from
Mar 30, 2023

Conversation

AlekSi
Copy link
Member

@AlekSi AlekSi commented Mar 28, 2023

Description

Closes #1733.

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.

@AlekSi AlekSi added this to the v1.0.0 GA milestone Mar 28, 2023
@AlekSi AlekSi self-assigned this Mar 28, 2023
@mergify
Copy link
Contributor

mergify bot commented Mar 28, 2023

@AlekSi this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Mar 28, 2023
@AlekSi AlekSi added the no ci label Mar 28, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Mar 28, 2023
@AlekSi AlekSi closed this in #2319 Mar 29, 2023
AlekSi added a commit that referenced this pull request Mar 29, 2023
@AlekSi AlekSi reopened this Mar 29, 2023
@AlekSi AlekSi marked this pull request as ready for review March 30, 2023 03:39
@AlekSi AlekSi requested a review from a team as a code owner March 30, 2023 03:39
@AlekSi AlekSi requested review from a team and noisersup March 30, 2023 03:39
@AlekSi AlekSi added code/feature Some user-visible feature is not implemented yet trust PRs that can access Actions secrets packages PRs that should build packages and removed no ci labels Mar 30, 2023
@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Merging #2309 (32ed914) into main (5b72f85) will decrease coverage by 0.14%.
The diff coverage is 8.06%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2309      +/-   ##
==========================================
- Coverage   28.34%   28.21%   -0.14%     
==========================================
  Files         381      382       +1     
  Lines       18001    18096      +95     
==========================================
+ Hits         5103     5105       +2     
- Misses      12357    12449      +92     
- Partials      541      542       +1     
Impacted Files Coverage Δ
integration/setup/listener.go 0.00% <0.00%> (ø)
integration/setup/setup.go 73.72% <ø> (ø)
internal/clientconn/conninfo/conn_info.go 30.30% <0.00%> (+14.08%) ⬆️
internal/clientconn/cursor/cursor.go 0.00% <0.00%> (ø)
internal/handlers/common/getmore.go 0.00% <0.00%> (ø)
internal/handlers/pg/msg_find.go 0.00% <0.00%> (ø)
internal/handlers/pg/msg_getmore.go 0.00% <0.00%> (ø)
internal/handlers/registry/tigris.go 5.55% <0.00%> (-0.70%) ⬇️
internal/handlers/tigris/msg_dbstats.go 0.00% <ø> (ø)
internal/handlers/tigris/msg_find.go 0.00% <0.00%> (ø)
... and 6 more

... and 2 files with indirect coverage changes

Flag Coverage Δ
integration 4.94% <1.07%> (-0.03%) ⬇️
mongodb 4.94% <1.07%> (-0.03%) ⬇️
unit 26.91% <8.42%> (-0.14%) ⬇️

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

chilagrow
chilagrow previously approved these changes Mar 30, 2023
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Just a single comment, implementation looks great!

internal/clientconn/cursor/registry.go Show resolved Hide resolved
@AlekSi AlekSi removed trust PRs that can access Actions secrets packages PRs that should build packages labels Mar 30, 2023
@AlekSi AlekSi requested review from chilagrow and a team March 30, 2023 10:39
Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

Nice!

internal/handlers/common/getmore.go Show resolved Hide resolved
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

I think I understand the idea.

Asked one question about registry.

Taskfile.yml Show resolved Hide resolved
internal/handlers/registry/registry.go Show resolved Hide resolved
internal/clientconn/cursor/registry.go Show resolved Hide resolved
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.

LGTM

So, we make cursors experimental for now, and for getMore store iterator locally, right?

Taskfile.yml Show resolved Hide resolved
@AlekSi AlekSi merged commit 915ec41 into FerretDB:main Mar 30, 2023
@AlekSi AlekSi deleted the get-more branch March 30, 2023 14:58
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.

Support getMore command
5 participants