Skip to content

Commit dcc9053

Browse files
committed
Merge remote-tracking branch 'origin/master' into pr-167
2 parents a23b884 + 39dd640 commit dcc9053

File tree

81 files changed

+1825
-493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1825
-493
lines changed

CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ set (SOURCE_DIR "${PROJECT_SOURCE_DIR}/")
1313

1414
set (MONGOC_MAJOR_VERSION 1)
1515
set (MONGOC_MINOR_VERSION 1)
16-
set (MONGOC_MICRO_VERSION 1)
16+
set (MONGOC_MICRO_VERSION 5)
17+
set (MONGOC_PRERELEASE_VERSION dev)
1718
set (MONGOC_API_VERSION 1.0)
18-
set (MONGOC_VERSION 1.1.1)
19+
set (MONGOC_VERSION 1.1.5-dev)
1920

2021
set (CPACK_RESOURCE_FILE_LICENSE "${SOURCE_DIR}/COPYING")
2122
set (CPACK_PACKAGE_VERSION_MAJOR ${MONGOC_MAJOR_VERSION})
@@ -51,6 +52,10 @@ if (UNIX AND NOT APPLE)
5152
set(LIBS ${LIBS} rt)
5253
endif()
5354

55+
if (APPLE)
56+
cmake_policy(SET CMP0042 OLD)
57+
endif()
58+
5459
add_definitions(-D_GNU_SOURCE)
5560
add_definitions(-D_BSD_SOURCE)
5661
add_definitions("-DBINARY_DIR=\"${SOURCE_DIR}/tests/binary\"")
@@ -228,7 +233,8 @@ if (OPENSSL_FOUND)
228233
set(test-libmongoc-sources ${test-libmongoc-sources}
229234
${SOURCE_DIR}/tests/test-x509.c
230235
${SOURCE_DIR}/tests/ssl-test.c
231-
${SOURCE_DIR}/tests/test-mongoc-stream-tls.c)
236+
${SOURCE_DIR}/tests/test-mongoc-stream-tls.c
237+
${SOURCE_DIR}/tests/test-mongoc-stream-tls-hangup.c)
232238
mongoc_add_test(test-replica-set-ssl FALSE
233239
${SOURCE_DIR}/tests/test-replica-set-ssl.c
234240
${SOURCE_DIR}/tests/ha-test.c

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ typedef enum
9595
} my_flags_t;
9696
```
9797

98+
### Adding a new symbol
99+
100+
This should be done rarely but there are several things that you need to do
101+
when adding a new symbol.
102+
103+
- Add the symbol to `src/libmongoc.symbols`
104+
- Add the symbol to `build/autotools/versions.ldscript`
105+
- Add the symbol to `build/cmake/libmongoc.def`
106+
- Add the symbol to `build/cmake/libmongoc-ssl.def`
107+
- Add documentation for the new symbol in `doc/mongoc_your_new_symbol_name.page`
98108

99109
### Documentation
100110

@@ -110,5 +120,12 @@ have a locally running `mongod` instance available on `127.0.0.1:27017`. All
110120
tests should pass. Alternatively, you can specify `MONGOC_TEST_HOST`
111121
environment variable to specify a non-localhost hostname or ip address.
112122

123+
Set the `MONGOC_TEST_SSL` environment variable `on` to connect to the server via
124+
SSL with default options. Configure SSL options with paths
125+
`MONGOC_TEST_SSL_PEM_FILE`, `MONGOC_TEST_SSL_PEM_PWD`,
126+
`MONGOC_TEST_SSL_CA_FILE`, `MONGOC_TEST_SSL_CA_DIR`, and
127+
`MONGOC_TEST_SSL_CRL_FILE`. Set the `MONGOC_TEST_SSL_WEAK_CERT_VALIDATION`
128+
environment variable `on` to relax server certificate validation.
129+
113130
All tests should pass before submitting a patch.
114131

NEWS

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
Next release
2+
============
3+
4+
Changes include:
5+
* The fsync and j write concern flags imply acknowledged writes
6+
* Prevent using fsync or j with conflicting w=0 write concern
7+
8+
mongo-c-driver 1.1.4
9+
====================
10+
11+
It is my pleasure to announce to you the 1.1.4 release of the MongoDB C driver.
12+
13+
This release is a stable release with performance enhancements and bugfixes.
14+
15+
Changes include:
16+
* Fixed client pool concurrency issues
17+
* Fixed some scenarios where replica sets would fail to reconnect on primary
18+
step down.
19+
* Improved write concern handling
20+
* Validate port number in URI
21+
* Various other fixes
22+
23+
Thanks to everyone who contributed to the development of this point release for
24+
libmongoc.
25+
26+
* Jason Carey
27+
* Andrew Clayton
28+
* A. Jesse Jiryu Davis
29+
* Jeremy Mikola
30+
31+
Enjoy!
32+
33+
-- Jason Carey
34+
35+
36+
mongo-c-driver 1.1.2
37+
====================
38+
39+
It is my pleasure to announce to you the 1.1.2 release of the MongoDB C driver.
40+
41+
This release is a stable release with performance enhancements and bugfixes.
42+
43+
Changes include:
44+
* Process connectTimeoutMS cast insensitively
45+
* Addition of missing trace macros
46+
* Improvement of internal error messages
47+
* Fix a segfault in OpenSSL cleanup routines
48+
* Fix for IPv66 support for replica sets
49+
* Coalesce small vectorized TLS writes
50+
* MinGW fixups
51+
* Fix for a memory leak in get_database_names()
52+
* Fixes for patching write concern through the bulk api
53+
* Fix to normalize hostnames in uri parsing
54+
* Fix for managing connections in the client pool
55+
* Various other fixes
56+
57+
Thanks to everyone who contributed to the development of this point release for
58+
libmongoc.
59+
60+
* Andrew Clayton
61+
* Denis Gladkikh
62+
* Hannes Magnusson
63+
* Jason Carey
64+
* Jeremy Mikola
65+
* mschoenlaub
66+
* Samantha Ritter
67+
* Tyler Brock
68+
69+
Enjoy!
70+
71+
-- Jason Carey
72+
73+
174
mongo-c-driver 1.1.0
275
====================
376

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ communications to ascertain the necessary details, delaying a useful response.
6262
Here is a made-up example of a help request that provides the relevant
6363
information:
6464

65-
Hello, I'm trying to build the C driver with SSL, from mongo-c-driver-1.1.1.tar.gz. I'm on Ubuntu
65+
Hello, I'm trying to build the C driver with SSL, from mongo-c-driver-1.1.4.tar.gz. I'm on Ubuntu
6666
14.04, 64-bit Intel, with gcc 4.8.2. I run configure like::
6767

6868
$ ./configure --enable-sasl=yes
@@ -95,13 +95,13 @@ Building from Release Tarball
9595
Unless you intend on contributing to the mongo-c-driver, you will want to build
9696
from a release tarball.
9797

98-
The most current release is 1.1.1 which you can download here.
99-
`mongo-c-driver-1.1.1.tar.gz <https://github.com/mongodb/mongo-c-driver/releases/download/1.1.1/mongo-c-driver-1.1.1.tar.gz>`_.
98+
The most current release is 1.1.4 which you can download here.
99+
`mongo-c-driver-1.1.4.tar.gz <https://github.com/mongodb/mongo-c-driver/releases/download/1.1.4/mongo-c-driver-1.1.4.tar.gz>`_.
100100

101101
To build on UNIX-like systems, do the following::
102102

103-
$ tar xzf mongo-c-driver-1.1.1.tar.gz
104-
$ cd mongo-c-driver-1.1.1
103+
$ tar xzf mongo-c-driver-1.1.4.tar.gz
104+
$ cd mongo-c-driver-1.1.4
105105
$ ./configure
106106
$ make
107107
$ sudo make install
@@ -112,7 +112,7 @@ To see all of the options available to you during configuration, run::
112112

113113
To build on Windows Vista or newer with Visual Studio 2010, do the following::
114114

115-
cd mongo-c-driver-1.1.1
115+
cd mongo-c-driver-1.1.4
116116
cd src\libbson
117117
cmake -DCMAKE_INSTALL_PREFIX=C:\usr -G "Visual Studio 10 Win64" .
118118
msbuild.exe ALL_BUILD.vcxproj

build/autotools/CheckCompiler.m4

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,27 @@ AC_PROG_CXX
1515
c_compiler="unknown"
1616
AC_LANG_PUSH([C])
1717
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
18-
#if !(defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
18+
#if !(defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER))
1919
#error Not a supported GCC compiler
2020
#endif
21+
#if defined(__GNUC__)
22+
#define GCC_VERSION (__GNUC__ * 10000 \
23+
+ __GNUC_MINOR__ * 100 \
24+
+ __GNUC_PATCHLEVEL__)
25+
#if GCC_VERSION < 40100
26+
#error Not a supported GCC compiler
27+
#endif
28+
#endif
2129
])], [c_compiler="gcc"], [])
2230
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
23-
#if !(defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3)))
31+
#if defined(__clang__)
32+
#define CLANG_VERSION (__clang_major__ * 10000 \
33+
+ __clang_minor__ * 100 \
34+
+ __clang_patchlevel__)
35+
#if CLANG_VERSION < 30300
2436
#error Not a supported Clang compiler
2537
#endif
38+
#endif
2639
])], [c_compiler="clang"], [])
2740
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
2841
#if !(defined(__SUNPRO_C))

build/autotools/FindDependencies.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ AS_IF([test "$ac_cv_search_clock_gettime" = "-lrt"],
3232
AS_IF([test "$enable_rdtscp" = "yes"],
3333
[CPPFLAGS="$CPPFLAGS -DENABLE_RDTSCP"])
3434

35+
AS_IF([test "$enable_shm_counters" = "yes"],
36+
[CPPFLAGS="$CPPFLAGS -DMONGOC_ENABLE_SHM_COUNTERS"])
37+
3538
AX_PTHREAD

build/autotools/PrintBuildConfiguration.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AC_OUTPUT
22

3-
if test $(( ${MONGOC_MINOR_VERSION} % 2 )) -eq 1; then
3+
if test -n "$MONGOC_PRERELEASE_VERSION"; then
44
cat << EOF
55
*** IMPORTANT ***
66

@@ -33,6 +33,7 @@ Build configuration:
3333
Code coverage support : ${enable_coverage}
3434
Cross Compiling : ${enable_crosscompile}
3535
Fast counters : ${enable_rdtscp}
36+
Shared memory performance counters : ${enable_shm_counters}
3637
SASL : ${sasl_mode}
3738
SSL : ${enable_ssl}
3839
Libbson : ${with_libbson}

build/autotools/ReadCommandLineArguments.m4

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ AC_ARG_ENABLE(optimizations,
2323
])
2424
AC_MSG_RESULT([$enable_optimizations])
2525

26+
AC_MSG_CHECKING([whether to enable shared memory performance counters])
27+
AC_ARG_ENABLE(shm_counters,
28+
AC_HELP_STRING([--enable-shm-counters], [turn on shared memory performance counters [default=yes]]),
29+
[],[enable_shm_counters="yes"])
30+
AC_MSG_RESULT([$enable_shm_counters])
31+
2632
AC_MSG_CHECKING([whether to enable code coverage support])
2733
AC_ARG_ENABLE(coverage,
2834
AC_HELP_STRING([--enable-coverage], [enable code coverage support [default=no]]),

build/autotools/Versions.m4

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
m4_define([mongoc_major_version], [1])
22
m4_define([mongoc_minor_version], [1])
3-
m4_define([mongoc_micro_version], [1])
4-
m4_define([mongoc_version], [mongoc_major_version.mongoc_minor_version.mongoc_micro_version])
3+
m4_define([mongoc_micro_version], [5])
4+
m4_define([mongoc_prerelease_version], [dev])
5+
6+
m4_define(
7+
[mongoc_version],
8+
m4_ifset(
9+
[mongoc_prerelease_version],
10+
[mongoc_major_version.mongoc_minor_version.mongoc_micro_version-mongoc_prerelease_version],
11+
[mongoc_major_version.mongoc_minor_version.mongoc_micro_version]))
512

613
# bump up by 1 for every micro release with no API changes, otherwise
714
# set to 0. after release, bump up by 1
8-
m4_define([mongoc_interface_age], [1])
15+
m4_define([mongoc_interface_age], [5])
916
m4_define([mongoc_binary_age], [m4_eval(100 * mongoc_minor_version + mongoc_micro_version)])
1017

1118
m4_define([lt_current], [m4_eval(100 * mongoc_minor_version + mongoc_micro_version - mongoc_interface_age)])
1219
m4_define([lt_revision], [mongoc_interface_age])
1320
m4_define([lt_age], [m4_eval(mongoc_binary_age - mongoc_interface_age)])
1421

15-
m4_define([libbson_required_version], [1.1.1])
22+
m4_define([libbson_required_version], [1.1.4])
1623

1724
m4_define([sasl_required_version], [2.1.6])

build/rpm/mongo-c-driver.spec

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# norootforbuild
22

33
%define DriverName mongo-c-driver
4-
%define DriverVersion 1.1.1
4+
%define DriverVersion 1.1.5
55
%define BsonName libbson
6-
%define BsonVersion 1.1.1
6+
%define BsonVersion 1.1.5
77

88
Name: %{DriverName}
99
Version: %{DriverVersion}
@@ -117,6 +117,18 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
117117

118118

119119
%changelog -n %{DriverName}
120+
* Wed Apr 1 2015 Jason Carey <[email protected]> - 1.1.5-1
121+
- Post-release bump for 1.1.4
122+
123+
* Wed Apr 1 2015 Jason Carey <[email protected]> - 1.1.4-1
124+
- Release 1.1.4.
125+
126+
* Tue Mar 10 2015 Jason Carey <[email protected]> - 1.1.3-1
127+
- Post-release bump for 1.1.2
128+
129+
* Tue Mar 10 2015 Jason Carey <[email protected]> - 1.1.2-1
130+
- Release 1.1.2.
131+
120132
* Wed Jan 28 2015 Jason Carey <[email protected]> - 1.1.1-1
121133
- Post-release bump for 1.1.0
122134

@@ -167,6 +179,18 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
167179

168180

169181
%changelog -n %{BsonName}
182+
* Wed Apr 1 2015 Jason Carey <[email protected]> - 1.1.5-1
183+
- Post-release bump for 1.1.4
184+
185+
* Wed Apr 1 2015 Jason Carey <[email protected]> - 1.1.4-1
186+
- Release 1.1.4.
187+
188+
* Tue Mar 10 2015 Jason Carey <[email protected]> - 1.1.3-1
189+
- Post-release bump for 1.1.2
190+
191+
* Tue Mar 10 2015 Jason Carey <[email protected]> - 1.1.2-1
192+
- Release 1.1.2.
193+
170194
* Wed Jan 28 2015 Jason Carey <[email protected]> - 1.1.1-1
171195
- Post-release bump for 1.1.0
172196

0 commit comments

Comments
 (0)