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

refactor(NODE-5379): cursor internals to use async-await #3804

Merged
merged 7 commits into from Sep 12, 2023
Merged

Conversation

malikj2000
Copy link
Contributor

@malikj2000 malikj2000 commented Aug 9, 2023

Description

refactored cursor internals to use async-await syntax instead of callbacks

What is changing?

getMore, _initialize, cleanupCursor, and [kInit] now use async-await syntax
all classes that inherit from AbstractCursor now use async-await

Is there new documentation needed for these changes?

None

What is the motivation for this change?

further converting the driver to async-await

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@nbbeeken nbbeeken marked this pull request as draft August 10, 2023 17:29
@malikj2000 malikj2000 changed the title refactor(NODE-5379): refactor cursor internals to use async-await refactor(NODE-5379): cursor internals to use async-await Aug 11, 2023
@malikj2000 malikj2000 marked this pull request as ready for review August 11, 2023 18:14
@nbbeeken nbbeeken self-assigned this Aug 11, 2023
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Aug 11, 2023
nbbeeken
nbbeeken previously approved these changes Aug 14, 2023
@nbbeeken nbbeeken added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Aug 14, 2023
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

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

Did we test the changes iin this PR and see if they affect the memory leak reported in NODE-5502?

src/cursor/abstract_cursor.ts Show resolved Hide resolved
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

Did we test the changes iin this PR and see if they affect the memory leak reported in NODE-5502?

No, I was hoping you could do that when you were back we ended up needing more context on that in triage anyway, maybe this branch's changes will reveal something further.

src/cursor/abstract_cursor.ts Show resolved Hide resolved
src/cursor/find_cursor.ts Show resolved Hide resolved
src/cursor/find_cursor.ts Outdated Show resolved Hide resolved
.evergreen/install-dependencies.sh Outdated Show resolved Hide resolved
@nbbeeken nbbeeken self-assigned this Sep 8, 2023
Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

nbbeeken
nbbeeken previously approved these changes Sep 11, 2023
@nbbeeken nbbeeken added Team Review Needs review from team and removed Blocked Blocked on other work labels Sep 11, 2023
@baileympearson baileympearson removed their assignment Sep 11, 2023
Copy link
Contributor

@W-A-James W-A-James left a comment

Choose a reason for hiding this comment

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

I see we've pulled in the explain test skip PR, but are still failing some explain tests. Is that expected here?

nbbeeken
nbbeeken previously approved these changes Sep 12, 2023
@@ -12,7 +12,7 @@ import {

const explain = [true, false, 'queryPlanner', 'allPlansExecution', 'executionStats', 'invalid'];

describe('CRUD API explain option', function () {
describe.only('CRUD API explain option', function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove .only

@nbbeeken nbbeeken merged commit b1c0eac into main Sep 12, 2023
23 of 26 checks passed
@nbbeeken nbbeeken deleted the NODE-5379 branch September 12, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
4 participants