Skip to content

Conversation

qingyang-hu
Copy link
Collaborator

GODRIVER-3523

Summary

Drop support for MongoDB 4.0.

Background & Motivation

@github-actions github-actions bot added the review-priority-normal Medium Priority PR for Review: within 1 business day label Oct 8, 2025
Copy link
Contributor

mongodb-drivers-pr-bot bot commented Oct 8, 2025

🧪 Performance Results

Commit SHA: 0ce103e

The following benchmark tests for version 68e6e20231536c0007d047c8 had statistically significant changes (i.e., |z-score| > 1.96):

Benchmark Measurement % Change Patch Value Stable Region H-Score Z-Score
BenchmarkBSONDeepDocumentDecoding ops_per_second_min 22.4338 2431.1203 Avg: 1985.6613
Med: 1996.0917
Stdev: 167.1050
0.8135 2.6657
BenchmarkBSONFullDocumentDecoding total_bytes_allocated 16.6299 415701824.0000 Avg: 356428068.9091
Med: 360143680.0000
Stdev: 20551053.1642
0.8523 2.8842
BenchmarkBSONFlatDocumentEncoding total_mem_allocs 14.6900 265352.0000 Avg: 231364.4690
Med: 231799.0000
Stdev: 7007.6800
0.8902 4.8500
BenchmarkBSONFlatDocumentEncoding total_bytes_allocated 14.5871 548957360.0000 Avg: 479074249.7699
Med: 479913704.0000
Stdev: 14431557.6550
0.8900 4.8424
BenchmarkBSONFullDocumentDecoding total_mem_allocs 14.4795 10044222.0000 Avg: 8773820.6042
Med: 8779734.5000
Stdev: 288604.3175
0.8907 4.4019
BenchmarkBSONFullDocumentEncoding total_bytes_allocated 11.3008 270292128.0000 Avg: 242848379.7522
Med: 242696304.0000
Stdev: 4809646.2804
0.9080 5.7060
BenchmarkBSONDeepDocumentEncoding total_mem_allocs 6.1892 235280.0000 Avg: 221566.8407
Med: 222611.0000
Stdev: 5710.6696
0.7789 2.4013
BenchmarkBSONDeepDocumentEncoding total_bytes_allocated 6.0998 167701848.0000 Avg: 158060451.2566
Med: 158826416.0000
Stdev: 4081994.8518
0.7770 2.3619
BenchmarkBSONDeepDocumentEncoding ns_per_op -5.8332 15295.0000 Avg: 16242.4602
Med: 16170.0000
Stdev: 429.8394
0.7613 -2.2042
BenchmarkBSONFullDocumentEncoding total_mem_allocs 2.7863 1561856.0000 Avg: 1519518.0000
Med: 1519518.0000
Stdev: 11602.2081
0.9031 3.6491
BenchmarkBSONFullDocumentDecoding ns_per_op -1.7321 73073.0000 Avg: 74361.0000
Med: 74361.0000
Stdev: 67.8823
0.9814 -18.9740
BenchmarkBSONFullDocumentEncoding ns_per_op -1.2220 23279.0000 Avg: 23567.0000
Med: 23567.0000
Stdev: 21.2132
0.9740 -13.5765
BenchmarkBSONFlatDocumentEncoding allocated_bytes_per_op -0.1070 6265.0000 Avg: 6271.7080
Med: 6272.0000
Stdev: 2.8806
0.7656 -2.3287
BenchmarkSingleRunCommand allocated_bytes_per_op -0.0939 12186.0000 Avg: 12197.4583
Med: 12197.0000
Stdev: 5.3154
0.7521 -2.1557
BenchmarkBSONFullDocumentDecoding allocated_bytes_per_op 0.0253 25330.0000 Avg: 25323.6042
Med: 25324.0000
Stdev: 1.0865
0.9144 5.8868

For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch.

Copy link
Contributor

API Change Report

No changes found!

@qingyang-hu qingyang-hu marked this pull request as ready for review October 8, 2025 23:10
@qingyang-hu qingyang-hu requested a review from a team as a code owner October 8, 2025 23:10
Copy link
Contributor

@Copilot 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

This pull request drops support for MongoDB 4.0, updating the minimum supported MongoDB version to 4.2.

  • Updated minimum wire version from 7 (MongoDB 4.0) to 8 (MongoDB 4.2)
  • Removed version checks and constraints for MongoDB 4.0 throughout the codebase
  • Added skip entries for pre-4.2 SDAM tests that are no longer relevant

Reviewed Changes

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

Show a summary per file
File Description
x/mongo/driver/topology/topology_test.go Updated error message to reflect new minimum wire version requirement
x/mongo/driver/topology/sdam_spec_test.go Added CheckSkip call to skip irrelevant pre-4.2 tests
x/mongo/driver/topology/fsm.go Updated MinSupportedMongoDBVersion constant from "4.0" to "4.2"
x/mongo/driver/integration/scram_test.go Removed MongoDB 4.0 version check and unused import
mongo/options/listcollectionsoptions.go Removed MongoDB 4.0 version constraint from documentation
mongo/options/changestreamoptions.go Removed MongoDB 4.0 version constraint from documentation
internal/spectest/skip.go Added skip entries for pre-4.2 SDAM tests
internal/integration/sdam_error_handling_test.go Removed MongoDB 4.0 version constraints from test options
internal/integration/primary_stepdown_test.go Simplified test cases by removing version constraints
internal/integration/change_stream_test.go Removed MongoDB 4.0 specific test cases and helper functions
internal/driverutil/description.go Updated MinWireVersion constant from 7 to 8
internal/docexamples/examples_test.go Simplified causal consistency examples by removing version filtering
README.md Updated documentation to reflect MongoDB 4.2 as minimum version
.evergreen/config.yml Removed MongoDB 4.0 build variants from CI configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@qingyang-hu qingyang-hu requested review from matthewdale and removed request for prestonvasquez October 8, 2025 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement review-priority-normal Medium Priority PR for Review: within 1 business day

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant