Skip to content

Commit 53ac72e

Browse files
committed
CDRIVER-2116 Enable compression support by default
1 parent 9f9934d commit 53ac72e

File tree

7 files changed

+152
-28
lines changed

7 files changed

+152
-28
lines changed

.evergreen/config.yml

Lines changed: 101 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ tasks:
429429
- func: "upload release"
430430
- func: "upload build"
431431

432-
- name: debug-compile-experimental
432+
- name: debug-compile-zlib
433+
tags: ["zlib", "compression"]
433434
commands:
434435
- command: shell.exec
435436
type: test
@@ -438,22 +439,113 @@ tasks:
438439
script: |
439440
set -o errexit
440441
set -o xtrace
441-
DEBUG=yes CC='${CC}' MARCH='${MARCH}' EXTRA_CONFIGURE_FLAGS="--enable-snappy=yes --enable-zlib=yes MONGOC_36_EXPERIMENT=yes" sh .evergreen/compile.sh
442+
DEBUG=yes CC='${CC}' MARCH='${MARCH}' EXTRA_CONFIGURE_FLAGS="--enable-snappy=no --enable-zlib=yes" sh .evergreen/compile.sh
442443
- func: "upload build"
443444

444-
- name: test-latest-server-experimental
445+
- name: debug-compile-snappy
446+
tags: ["snappy", "compression"]
447+
commands:
448+
- command: shell.exec
449+
type: test
450+
params:
451+
working_dir: "mongoc"
452+
script: |
453+
set -o errexit
454+
set -o xtrace
455+
DEBUG=yes CC='${CC}' MARCH='${MARCH}' EXTRA_CONFIGURE_FLAGS="--enable-snappy=yes --enable-zlib=no" sh .evergreen/compile.sh
456+
- func: "upload build"
457+
458+
- name: debug-compile-compression
459+
tags: ["zlib", "snappy", "compression"]
460+
commands:
461+
- command: shell.exec
462+
type: test
463+
params:
464+
working_dir: "mongoc"
465+
script: |
466+
set -o errexit
467+
set -o xtrace
468+
DEBUG=yes CC='${CC}' MARCH='${MARCH}' EXTRA_CONFIGURE_FLAGS="--enable-snappy=yes --enable-zlib=yes" sh .evergreen/compile.sh
469+
- func: "upload build"
470+
471+
- name: test-latest-server-zlib
472+
tags: ["zlib", "compression"]
445473
depends_on:
446-
- name: "debug-compile-experimental"
474+
- name: "debug-compile-zlib"
447475
commands:
448476
- func: "fetch build"
449477
vars:
450-
BUILD_NAME: "debug-compile-experimental"
478+
BUILD_NAME: "debug-compile-zlib"
451479
- func: "bootstrap mongo-orchestration"
452480
vars:
453481
VERSION: "latest"
454482
TOPOLOGY: "server"
455483
AUTH: "noauth"
456484
SSL: "nossl"
485+
ORCHESTRATION_FILE: "zlib"
486+
- func: "run tests"
487+
vars:
488+
AUTH: "noauth"
489+
SSL: "nossl"
490+
COMPRESSORS: zlib
491+
492+
493+
- name: test-latest-server-snappy
494+
tags: ["snappy", "compression"]
495+
depends_on:
496+
- name: "debug-compile-snappy"
497+
commands:
498+
- func: "fetch build"
499+
vars:
500+
BUILD_NAME: "debug-compile-snappy"
501+
- func: "bootstrap mongo-orchestration"
502+
vars:
503+
VERSION: "latest"
504+
TOPOLOGY: "server"
505+
AUTH: "noauth"
506+
SSL: "nossl"
507+
ORCHESTRATION_FILE: "snappy"
508+
- func: "run tests"
509+
vars:
510+
AUTH: "noauth"
511+
SSL: "nossl"
512+
COMPRESSORS: snappy
513+
514+
- name: test-latest-server-compression
515+
tags: ["zlib", "snappy", "compression"]
516+
depends_on:
517+
- name: "debug-compile-compression"
518+
commands:
519+
- func: "fetch build"
520+
vars:
521+
BUILD_NAME: "debug-compile-compression"
522+
- func: "bootstrap mongo-orchestration"
523+
vars:
524+
VERSION: "latest"
525+
TOPOLOGY: "server"
526+
AUTH: "noauth"
527+
SSL: "nossl"
528+
- func: "run tests"
529+
vars:
530+
AUTH: "noauth"
531+
SSL: "nossl"
532+
COMPRESSORS: zlib,snappy
533+
534+
535+
- name: test-3.4-server-compression
536+
tags: ["zlib", "snappy", "compression"]
537+
depends_on:
538+
- name: "debug-compile-compression"
539+
commands:
540+
- func: "fetch build"
541+
vars:
542+
BUILD_NAME: "debug-compile-compression"
543+
- func: "bootstrap mongo-orchestration"
544+
vars:
545+
VERSION: "3.4"
546+
TOPOLOGY: "server"
547+
AUTH: "noauth"
548+
SSL: "nossl"
457549
ORCHESTRATION_FILE: "experimental"
458550
- func: "run tests"
459551
vars:
@@ -6512,6 +6604,7 @@ buildvariants:
65126604
- ubuntu1604-build
65136605
- ubuntu1604-test
65146606
tasks:
6607+
- ".compression"
65156608
- "debug-compile-scan-build"
65166609
- "debug-compile-sanitizer-address"
65176610
- "debug-compile-sanitizer-undefined"
@@ -6646,6 +6739,7 @@ buildvariants:
66466739
- ubuntu1604-build
66476740
- ubuntu1604-test
66486741
tasks:
6742+
- ".compression"
66496743
- "debug-compile-coverage"
66506744
- "release-compile"
66516745
- "debug-compile"
@@ -6965,6 +7059,7 @@ buildvariants:
69657059
- ubuntu1604-arm64-large
69667060
- ubuntu1604-arm64-small
69677061
tasks:
7062+
- ".compression"
69687063
- "debug-compile-scan-build"
69697064
- "debug-compile-coverage"
69707065
- "release-compile"
@@ -7049,6 +7144,4 @@ buildvariants:
70497144
run_on:
70507145
- archlinux-build
70517146
tasks:
7052-
- "debug-compile-experimental"
7053-
- "test-latest-server-experimental"
7054-
7147+
- ".compression"

NEWS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ Next Release
33

44
* Minimum required CMake version has been increased to 3.1.
55
* CMake remains experimental on non-Windows platforms and issues a warning now
6-
* Experimental support for wire compression.
6+
* Support for wire compression.
77
* Support for snappy and zlib. MongoDB 3.4 only supports snappy, while zlib
8-
support is expected in MongoDB 3.6. Wire compression is still experimental
9-
for MongoDB clients, and therefore hidden from default configuration.
8+
support is expected in MongoDB 3.6.
109
The enable, configure mongoc like so:
11-
./configure --enable-snappy --enable-zlib MONGOC_36_EXPERIMENT=yes
10+
./configure --enable-snappy --enable-zlib
1211
* New functions: mongoc_uri_get_compressors & mongoc_uri_set_compressors, to
1312
get and set compressor configuration on mongoc_uri_t
1413
* Added support for comma seperated "compressors" connection string option (e.g.

build/autotools/PrintBuildConfiguration.m4

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ if test x"${enable_automatic_init_and_cleanup}" != x"no"; then
2828
fi
2929
if test "x$MONGOC_36_EXPERIMENT" = "xyes"; then
3030
experimental_features="
31-
Snappy Compression : ${enable_snappy}
32-
Zlib Compression : ${enable_zlib}"
31+
Feature #1 : ${enable_feature_1}"
3332
fi
3433

3534
echo "
@@ -46,7 +45,9 @@ Build configuration:
4645
Fast counters : ${enable_rdtscp}
4746
Shared memory performance counters : ${enable_shm_counters}
4847
SASL : ${sasl_mode}
49-
SSL : ${enable_ssl}${experimental_features}
48+
SSL : ${enable_ssl}
49+
Snappy Compression : ${enable_snappy}
50+
Zlib Compression : ${enable_zlib}${experimental_features}
5051
Libbson : ${with_libbson}
5152

5253
Documentation:

configure.ac

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,19 @@ LT_INIT
3737

3838
m4_include([build/autotools/ReadCommandLineArguments.m4])
3939
m4_include([build/autotools/CheckSasl.m4])
40-
if test "x$MONGOC_36_EXPERIMENT" = "xyes"; then
41-
m4_include([build/autotools/CheckSnappy.m4])
42-
m4_include([build/autotools/CheckZlib.m4])
43-
44-
if test "x$have_zlib" = "xyes" -o "x$have_snappy" = "xyes"; then
45-
AC_SUBST(MONGOC_ENABLE_COMPRESSION, 1)
46-
else
47-
AC_SUBST(MONGOC_ENABLE_COMPRESSION, 0)
48-
fi
40+
#if test "x$MONGOC_36_EXPERIMENT" = "xyes"; then
41+
# m4_include([build/autotools/feature.m4])
42+
#else
43+
# AC_SUBST(MONGOC_FEATURE, 0)
44+
# enable_feature_1=no
45+
#fi
46+
m4_include([build/autotools/CheckSnappy.m4])
47+
m4_include([build/autotools/CheckZlib.m4])
48+
49+
if test "x$have_zlib" = "xyes" -o "x$have_snappy" = "xyes"; then
50+
AC_SUBST(MONGOC_ENABLE_COMPRESSION, 1)
4951
else
5052
AC_SUBST(MONGOC_ENABLE_COMPRESSION, 0)
51-
AC_SUBST(MONGOC_ENABLE_COMPRESSION_SNAPPY, 0)
52-
AC_SUBST(MONGOC_ENABLE_COMPRESSION_ZLIB, 0)
53-
enable_snappy=no
54-
enable_zlib=no
5553
fi
5654
m4_include([build/autotools/CheckSSL.m4])
5755
m4_include([build/autotools/FindDependencies.m4])
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "mongod",
3+
"procParams": {
4+
"networkMessageCompressors": "snappy,zlib",
5+
"ipv6": true,
6+
"bind_ip": "",
7+
"logappend": true,
8+
"journal": true,
9+
"port": 27017
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "mongod",
3+
"procParams": {
4+
"networkMessageCompressors": "snappy",
5+
"ipv6": true,
6+
"bind_ip": "",
7+
"logappend": true,
8+
"journal": true,
9+
"port": 27017
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "mongod",
3+
"procParams": {
4+
"networkMessageCompressors": "zlib",
5+
"ipv6": true,
6+
"bind_ip": "",
7+
"logappend": true,
8+
"journal": true,
9+
"port": 27017
10+
}
11+
}

0 commit comments

Comments
 (0)