Skip to content

CSHARP-6029: Make ICoreServerSessionPool disposable and send endSessions on dispose - fix failing tests#2010

Merged
sanych-sun merged 1 commit into
mongodb:mainfrom
sanych-sun:CSHARP-6029
May 25, 2026
Merged

CSHARP-6029: Make ICoreServerSessionPool disposable and send endSessions on dispose - fix failing tests#2010
sanych-sun merged 1 commit into
mongodb:mainfrom
sanych-sun:CSHARP-6029

Conversation

@sanych-sun
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 25, 2026 20:15
@sanych-sun sanych-sun added the chore Non–user-facing code changes (tests, build scripts, etc.). label May 25, 2026
@sanych-sun sanych-sun requested a review from a team as a code owner May 25, 2026 20:15
@sanych-sun sanych-sun requested review from BorisDog and papafe May 25, 2026 20:15
@sanych-sun sanych-sun removed the request for review from papafe May 25, 2026 20:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates session-pool shutdown behavior and aligns OpenTelemetry smoke test expectations with the additional activity emitted during cluster disposal.

Changes:

  • Avoids attempting to create/pop a zero-length session batch when disposing the server session pool.
  • Updates OpenTelemetry smoke test activity counts to reflect the additional command activity during disposal.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/SmokeTests/MongoDB.Driver.SmokeTests.Sdk/OpenTelemetryTests.cs Updates expected captured activity totals after disposal now emits an additional command activity.
src/MongoDB.Driver/Core/Bindings/CoreServerSessionPool.cs Adds an early exit when the pool is empty to avoid zero-sized batch handling during disposal.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

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

LGTM

@sanych-sun sanych-sun merged commit d06d0e4 into mongodb:main May 25, 2026
37 of 38 checks passed
@sanych-sun sanych-sun deleted the CSHARP-6029 branch May 25, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Non–user-facing code changes (tests, build scripts, etc.).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants