Skip to content

Conversation

@PavelSafronov
Copy link
Contributor

Description

Summary of Changes

Replace process.nextTick() with .queueMicrotask()

What is the motivation for this change?

This helps us reduce our runtime dependencies, as part of https://jira.mongodb.org/browse/NODE-6601

Double check the following

  • Lint is passing (npm run check:lint)
  • 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

@PavelSafronov PavelSafronov reopened this Dec 3, 2025
addaleax
addaleax previously approved these changes Dec 3, 2025
@PavelSafronov PavelSafronov marked this pull request as ready for review December 5, 2025 19:59
@PavelSafronov PavelSafronov requested a review from a team as a code owner December 5, 2025 19:59
// This is a guarantee in node, unless you are performing a transaction (which is not being done in this test)
expect(new Set(events.map(ev => ev.command.lsid.id.toString('hex')))).to.have.lengthOf(1);
const uniqueSessionIds = new Set(events.map(ev => ev.command.lsid.id.toString('hex')));
expect(uniqueSessionIds).to.have.length.lessThanOrEqual(2);
Copy link
Member

@tadjik1 tadjik1 Dec 8, 2025

Choose a reason for hiding this comment

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

Can you please elaborate on this change?
Maybe some summary from the slack thread would be good for potential future investigations, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely, adding information about the timing, as well as an example bulkWrite that would have broken the old version of this test.

@tadjik1 tadjik1 added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Dec 8, 2025
@tadjik1 tadjik1 self-assigned this Dec 8, 2025
@tadjik1 tadjik1 requested a review from a team December 8, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primary Review In Review with primary reviewer, not yet ready for team's eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants