libcouchbase 1.3.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +2 -2
  3. data/ext/libcouchbase/CMakeLists.txt +51 -25
  4. data/ext/libcouchbase/CONTRIBUTING.md +46 -65
  5. data/ext/libcouchbase/RELEASE_NOTES.markdown +163 -0
  6. data/ext/libcouchbase/cmake/Modules/DownloadLcbDep.cmake +9 -11
  7. data/ext/libcouchbase/cmake/Modules/FindProfiler.cmake +16 -0
  8. data/ext/libcouchbase/cmake/Modules/GetVersionInfo.cmake +6 -6
  9. data/ext/libcouchbase/cmake/config-cmake.h.in +2 -0
  10. data/ext/libcouchbase/cmake/configure +16 -0
  11. data/ext/libcouchbase/example/CMakeLists.txt +17 -2
  12. data/ext/libcouchbase/example/analytics/.gitignore +1 -0
  13. data/ext/libcouchbase/example/analytics/analytics.c +158 -0
  14. data/ext/libcouchbase/example/analytics/build-queries.rb +34 -0
  15. data/ext/libcouchbase/example/analytics/cJSON.c +1 -0
  16. data/ext/libcouchbase/example/analytics/cJSON.h +1 -0
  17. data/ext/libcouchbase/example/analytics/queries.h +113 -0
  18. data/ext/libcouchbase/example/analytics/queries/00-show-dataverse.json +5 -0
  19. data/ext/libcouchbase/example/analytics/queries/01-setup-dataset-breweries.json +6 -0
  20. data/ext/libcouchbase/example/analytics/queries/02-setup-dataset-beers.json +6 -0
  21. data/ext/libcouchbase/example/analytics/queries/03-initiate-shadow.json +6 -0
  22. data/ext/libcouchbase/example/analytics/queries/04-list-datasets.json +7 -0
  23. data/ext/libcouchbase/example/analytics/queries/05-count-breweries.json +5 -0
  24. data/ext/libcouchbase/example/analytics/queries/06-first-brewery.json +6 -0
  25. data/ext/libcouchbase/example/analytics/queries/07-key-based-lookup.json +6 -0
  26. data/ext/libcouchbase/example/analytics/queries/08-exact-match-lookup.json +7 -0
  27. data/ext/libcouchbase/example/analytics/queries/09-exact-match-lookup-different-shape.json +6 -0
  28. data/ext/libcouchbase/example/analytics/queries/10-other-query-filters.json +6 -0
  29. data/ext/libcouchbase/example/analytics/queries/11-equijoin.json +9 -0
  30. data/ext/libcouchbase/example/analytics/queries/12-equijoin-select-star.json +10 -0
  31. data/ext/libcouchbase/example/analytics/queries/13-ansi-join.json +8 -0
  32. data/ext/libcouchbase/example/analytics/queries/14-join-select-values.json +8 -0
  33. data/ext/libcouchbase/example/analytics/queries/15-nested-outer-join.json +7 -0
  34. data/ext/libcouchbase/example/analytics/queries/16-theta-join.json +8 -0
  35. data/ext/libcouchbase/example/analytics/queries/17-existential-quantification.json +9 -0
  36. data/ext/libcouchbase/example/analytics/queries/18-universal-quantification.json +7 -0
  37. data/ext/libcouchbase/example/analytics/queries/19-simple-aggregation.json +6 -0
  38. data/ext/libcouchbase/example/analytics/queries/20-simple-aggregation-unwrapped-value.json +6 -0
  39. data/ext/libcouchbase/example/analytics/queries/21-simple-aggregation-explicit.json +6 -0
  40. data/ext/libcouchbase/example/analytics/queries/22-grouping-and-aggregation.json +6 -0
  41. data/ext/libcouchbase/example/analytics/queries/23-grouping-and-aggregation-with-hint.json +7 -0
  42. data/ext/libcouchbase/example/analytics/queries/24-grouping-and-limits.json +7 -0
  43. data/ext/libcouchbase/example/analytics/queries/25-named-parameters.json +7 -0
  44. data/ext/libcouchbase/example/analytics/queries/26-positional-parameters.json +7 -0
  45. data/ext/libcouchbase/example/crypto/common_provider.c +2 -0
  46. data/ext/libcouchbase/example/crypto/common_provider.h +2 -0
  47. data/ext/libcouchbase/example/crypto/openssl_symmetric_decrypt.c +5 -0
  48. data/ext/libcouchbase/example/crypto/openssl_symmetric_encrypt.c +0 -1
  49. data/ext/libcouchbase/example/crypto/openssl_symmetric_provider.c +16 -26
  50. data/ext/libcouchbase/example/db/db.c +10 -6
  51. data/ext/libcouchbase/example/fts/.gitignore +1 -0
  52. data/ext/libcouchbase/example/fts/build-queries.rb +33 -0
  53. data/ext/libcouchbase/example/fts/fts.c +142 -0
  54. data/ext/libcouchbase/example/fts/queries.h +61 -0
  55. data/ext/libcouchbase/example/fts/queries/00-simple-text-query.json +12 -0
  56. data/ext/libcouchbase/example/fts/queries/01-simple-text-query-on-non-default-index.json +9 -0
  57. data/ext/libcouchbase/example/fts/queries/02-simple-text-query-on-stored-field.json +13 -0
  58. data/ext/libcouchbase/example/fts/queries/03-match-query-with-facet.json +19 -0
  59. data/ext/libcouchbase/example/fts/queries/04-docid-query.json +11 -0
  60. data/ext/libcouchbase/example/fts/queries/05-unanalyzed-term-query-with-fuzziness-level-of-0.json +13 -0
  61. data/ext/libcouchbase/example/fts/queries/06-unanalyzed-term-query-with-fuzziness-level-of-2.json +14 -0
  62. data/ext/libcouchbase/example/fts/queries/07-match-phrase-query.json +13 -0
  63. data/ext/libcouchbase/example/fts/queries/08-phrase-query.json +16 -0
  64. data/ext/libcouchbase/example/fts/queries/09-query-string-query.json +9 -0
  65. data/ext/libcouchbase/example/fts/queries/10-conjunction-query.json +21 -0
  66. data/ext/libcouchbase/example/fts/queries/11-wild-card-query.json +13 -0
  67. data/ext/libcouchbase/example/fts/queries/12-numeric-range-query.json +11 -0
  68. data/ext/libcouchbase/example/fts/queries/13-regexp-query.json +13 -0
  69. data/ext/libcouchbase/example/minimal/.gitignore +1 -0
  70. data/ext/libcouchbase/example/minimal/query.c +185 -0
  71. data/ext/libcouchbase/example/subdoc/subdoc-xattrs.c +2 -2
  72. data/ext/libcouchbase/example/tracing/cJSON.c +1 -1
  73. data/ext/libcouchbase/example/tracing/cJSON.h +1 -1
  74. data/ext/libcouchbase/include/libcouchbase/cbft.h +38 -4
  75. data/ext/libcouchbase/include/libcouchbase/cntl-private.h +8 -97
  76. data/ext/libcouchbase/include/libcouchbase/cntl.h +288 -8
  77. data/ext/libcouchbase/include/libcouchbase/couchbase.h +47 -10
  78. data/ext/libcouchbase/include/libcouchbase/crypto.h +214 -48
  79. data/ext/libcouchbase/include/libcouchbase/deprecated.h +12 -0
  80. data/ext/libcouchbase/include/libcouchbase/error.h +33 -2
  81. data/ext/libcouchbase/include/libcouchbase/ixmgmt.h +1 -1
  82. data/ext/libcouchbase/include/libcouchbase/n1ql.h +87 -13
  83. data/ext/libcouchbase/include/libcouchbase/subdoc.h +3 -7
  84. data/ext/libcouchbase/include/libcouchbase/tracing.h +174 -56
  85. data/ext/libcouchbase/include/libcouchbase/vbucket.h +21 -1
  86. data/ext/libcouchbase/include/libcouchbase/views.h +49 -4
  87. data/ext/libcouchbase/packaging/deb/control +2 -3
  88. data/ext/libcouchbase/packaging/parse-git-describe.pl +1 -1
  89. data/ext/libcouchbase/plugins/io/libev/CMakeLists.txt +7 -5
  90. data/ext/libcouchbase/plugins/io/libevent/CMakeLists.txt +7 -5
  91. data/ext/libcouchbase/plugins/io/libuv/CMakeLists.txt +14 -12
  92. data/ext/libcouchbase/plugins/io/libuv/libuv_compat.h +3 -0
  93. data/ext/libcouchbase/plugins/io/libuv/plugin-libuv.c +14 -6
  94. data/ext/libcouchbase/plugins/io/select/CMakeLists.txt +7 -5
  95. data/ext/libcouchbase/src/bootstrap.cc +6 -1
  96. data/ext/libcouchbase/src/bucketconfig/bc_cccp.cc +2 -7
  97. data/ext/libcouchbase/src/bucketconfig/bc_file.cc +1 -1
  98. data/ext/libcouchbase/src/bucketconfig/bc_http.cc +4 -11
  99. data/ext/libcouchbase/src/bucketconfig/clconfig.h +29 -36
  100. data/ext/libcouchbase/src/bucketconfig/confmon.cc +4 -2
  101. data/ext/libcouchbase/src/cntl.cc +181 -151
  102. data/ext/libcouchbase/src/config_static.h +1 -1
  103. data/ext/libcouchbase/src/connspec.cc +5 -1
  104. data/ext/libcouchbase/src/connspec.h +3 -1
  105. data/ext/libcouchbase/src/crypto.cc +93 -80
  106. data/ext/libcouchbase/src/dns-srv.cc +1 -1
  107. data/ext/libcouchbase/src/handler.cc +0 -1
  108. data/ext/libcouchbase/src/http/http-priv.h +1 -0
  109. data/ext/libcouchbase/src/http/http.cc +1 -2
  110. data/ext/libcouchbase/src/instance.cc +21 -2
  111. data/ext/libcouchbase/src/internal.h +1 -0
  112. data/ext/libcouchbase/src/lcbio/ctx.c +24 -3
  113. data/ext/libcouchbase/src/lcbio/ioutils.cc +1 -1
  114. data/ext/libcouchbase/src/lcbio/rw-inl.h +22 -1
  115. data/ext/libcouchbase/src/lcbio/ssl.h +2 -0
  116. data/ext/libcouchbase/src/mc/compress.cc +18 -11
  117. data/ext/libcouchbase/src/mc/mcreq.c +2 -0
  118. data/ext/libcouchbase/src/mc/mcreq.h +1 -1
  119. data/ext/libcouchbase/src/mcserver/mcserver.cc +163 -6
  120. data/ext/libcouchbase/src/mcserver/negotiate.cc +17 -7
  121. data/ext/libcouchbase/src/n1ql/n1ql.cc +12 -3
  122. data/ext/libcouchbase/src/newconfig.cc +4 -3
  123. data/ext/libcouchbase/src/nodeinfo.cc +1 -7
  124. data/ext/libcouchbase/src/operations/observe.cc +1 -0
  125. data/ext/libcouchbase/src/operations/ping.cc +5 -3
  126. data/ext/libcouchbase/src/retryq.cc +22 -0
  127. data/ext/libcouchbase/src/retryq.h +2 -1
  128. data/ext/libcouchbase/src/rnd.cc +5 -12
  129. data/ext/libcouchbase/src/settings.c +4 -7
  130. data/ext/libcouchbase/src/settings.h +6 -2
  131. data/ext/libcouchbase/src/strcodecs/base64.c +59 -0
  132. data/ext/libcouchbase/src/strcodecs/strcodecs.h +2 -0
  133. data/ext/libcouchbase/src/trace.h +2 -2
  134. data/ext/libcouchbase/src/tracing/span.cc +177 -45
  135. data/ext/libcouchbase/src/tracing/threshold_logging_tracer.cc +70 -28
  136. data/ext/libcouchbase/src/tracing/tracing-internal.h +33 -48
  137. data/ext/libcouchbase/src/vbucket/vbucket.c +146 -30
  138. data/ext/libcouchbase/src/wait.cc +1 -1
  139. data/ext/libcouchbase/tests/CMakeLists.txt +13 -4
  140. data/ext/libcouchbase/tests/iotests/mock-environment.cc +1 -1
  141. data/ext/libcouchbase/tests/iotests/t_misc.cc +2 -2
  142. data/ext/libcouchbase/tests/iotests/t_views.cc +1 -1
  143. data/ext/libcouchbase/tests/iotests/testutil.cc +3 -2
  144. data/ext/libcouchbase/tests/vbucket/confdata/map_node_present_nodesext_missing_nodes.json +94 -0
  145. data/ext/libcouchbase/tests/vbucket/t_config.cc +15 -0
  146. data/ext/libcouchbase/tools/CMakeLists.txt +11 -6
  147. data/ext/libcouchbase/tools/cbc-handlers.h +9 -0
  148. data/ext/libcouchbase/tools/cbc-proxy.cc +1 -1
  149. data/ext/libcouchbase/tools/cbc.cc +33 -5
  150. data/ext/libcouchbase/tools/common/options.cc +1 -1
  151. data/ext/libcouchbase/tools/extract-packets.rb +110 -0
  152. data/lib/libcouchbase/connection.rb +13 -5
  153. data/lib/libcouchbase/ext/tasks.rb +1 -1
  154. data/lib/libcouchbase/version.rb +1 -1
  155. metadata +62 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7e84d37abd4f01d3b311fa83fb9e16ce72bd6915
4
- data.tar.gz: c4ad09758711a1d26e27a41182f06c4100e023d9
2
+ SHA256:
3
+ metadata.gz: b172187390ddfc2dc86237a79ef832a549bca165444698ede8f63809e4c3f105
4
+ data.tar.gz: fecdac01bd86eff07dd3df41255d1e32e69584ea68fe1fafee94a077f692a8e1
5
5
  SHA512:
6
- metadata.gz: 771464b5f1b88f5f4e123628639a3fd8dfb3adaecd55645f8cdf4b69888b7cf2ab38aace66c45105c2e9af6905a4b90a46455055e158d75e89f66f1c47ff117d
7
- data.tar.gz: 74f4262314b368ade557710421460d7a13e382e3f828ccf9fb0481aa86aea0153e5d581a064d9241baa0eae85800d2f2137255eca39a900eca2615ed4bb3a10d
6
+ metadata.gz: faba3770db49503a88fda091f6dcc1fd4b7a597c5477086e546425c30da5bcebfd1e769429d35be9c0d9a6c2296642975460e474050f27cb8d89e361d82bbd48
7
+ data.tar.gz: bcd23374ae6b40ffb7e41aa9929289f1a653753533b7e07aa47d807beaf8bbe24aaef4e0a3316ccf281ddeb6f5a0ca19a52b178896879c0833f77f459db32ec2
@@ -6,7 +6,7 @@ rvm:
6
6
  - jruby-9.1.13.0
7
7
  - jruby-head
8
8
  - rubinius
9
- - rubinius-3.103
9
+ - rubinius-3.86
10
10
  branches:
11
11
  only:
12
12
  - master
@@ -33,6 +33,6 @@ matrix:
33
33
  - rvm: jruby-head
34
34
  - rvm: ruby-head
35
35
  - rvm: rubinius
36
- - rvm: rubinius-3.103
36
+ - rvm: rubinius-3.86
37
37
  sudo: required
38
38
  dist: trusty
@@ -23,9 +23,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
23
23
  # These variables can be modified as needed
24
24
 
25
25
  # Couchbase mock path to download
26
- SET(COUCHBASE_MOCK_VERSION CouchbaseMock-1.5.19.jar)
27
- # Maven repository where ${COUCHBASE_MOCK_VERSION} is to be found
28
- SET(COUCHBASE_MOCK_DLSERVER http://packages.couchbase.com/clients/c/mock)
26
+ SET(COUCHBASE_MOCK_VERSION 1.5.19)
27
+ SET(COUCHBASE_MOCK_URL "https://github.com/couchbase/CouchbaseMock/releases/download/${COUCHBASE_MOCK_VERSION}/CouchbaseMock-${COUCHBASE_MOCK_VERSION}.jar")
29
28
  project(libcouchbase)
30
29
 
31
30
  OPTION(LCB_NO_TESTS "Disable building of tests" OFF)
@@ -46,6 +45,13 @@ OPTION(LCB_EMBED_PLUGIN_LIBEVENT "Embed the libevent plugin" OFF)
46
45
  OPTION(LCB_STATIC_LIBEVENT "Link static libevent (only applicable if EMBED_PLUGIN_LIBEVENT is ON" OFF)
47
46
  OPTION(LCB_USE_HDR_HISTOGRAM "Use HdrHistogram for statistics recording" OFF)
48
47
  OPTION(LCB_TRACING "Enable builtin tracing" ON)
48
+ OPTION(LCB_INSTALL_HEADERS "Install header files" ON)
49
+ OPTION(LCB_INSTALL_PKGCONFIG "Install pkgconfig/libcouchbase.pc" ON)
50
+ OPTION(LCB_DUMP_PACKETS "Enable dumping network packets on TRACE log level" OFF)
51
+ OPTION(LCB_USE_PROFILER "Build with profiler support (from gperftools)" OFF)
52
+ OPTION(LCB_SKIP_GIT_VERSION "Skip version detection using git" OFF)
53
+
54
+ STRING(TIMESTAMP LCB_BUILD_TIMESTAMP "%Y-%m-%d %H:%M:%S" UTC)
49
55
 
50
56
  ### END CONFIGURABLES ###
51
57
  IF(MSVC)
@@ -77,11 +83,16 @@ INCLUDE(cmake/Modules/FindCouchbaseLibev.cmake)
77
83
  INCLUDE(cmake/Modules/FindCouchbaseLibuv.cmake)
78
84
  INCLUDE(cmake/Modules/GetPlatformCCInfo.cmake)
79
85
  INCLUDE(cmake/Modules/GetVersionInfo.cmake)
80
- INCLUDE(cmake/Modules/CopyPDB.cmake)
86
+ IF (MSVC)
87
+ INCLUDE(cmake/Modules/CopyPDB.cmake)
88
+ ENDIF ()
81
89
  INCLUDE(cmake/Modules/DownloadLcbDep.cmake)
82
90
  INCLUDE(CheckIncludeFiles)
83
91
  INCLUDE(cmake/source_files.cmake)
84
92
 
93
+ IF(LCB_USE_PROFILER)
94
+ INCLUDE(cmake/Modules/FindProfiler.cmake)
95
+ ENDIF()
85
96
  IF(LCB_USE_HDR_HISTOGRAM)
86
97
  INCLUDE(cmake/Modules/FindCouchbaseHdrHistogram.cmake)
87
98
  ENDIF()
@@ -110,7 +121,7 @@ IF(NOT CMAKE_BUILD_TYPE)
110
121
  SET(CPACK_INSTALL_SCRIPT
111
122
  "${PROJECT_SOURCE_DIR}/cmake/Modules/DistScript.cmake")
112
123
  ENDIF()
113
- SET(lcb_package_name "libcouchbase-${LCB_VERSION}_${LCB_ARCH_STRING}_${LCB_CC_STRING}")
124
+ SET(lcb_package_name "libcouchbase-${LCB_VERSION}_${LCB_CC_STRING}_${LCB_ARCH_STRING}")
114
125
  SET(CPACK_PACKAGE_FILE_NAME ${lcb_package_name})
115
126
 
116
127
  IF(WIN32)
@@ -229,19 +240,25 @@ IF(LCB_NO_SSL)
229
240
  MESSAGE(STATUS "SSL support will be disabled")
230
241
  ADD_DEFINITIONS(-DLCB_NO_SSL=1)
231
242
  ELSE()
232
- IF(APPLE)
233
- IF(NOT OpenSSL_DIR)
234
- EXECUTE_PROCESS(COMMAND brew --prefix openssl
235
- OUTPUT_VARIABLE OPENSSL_ROOT_DIR
236
- OUTPUT_STRIP_TRAILING_WHITESPACE)
237
- MESSAGE(STATUS "Found OpenSSL Prefix: ${OPENSSL_ROOT_DIR}")
243
+ IF(NOT OPENSSL_FOUND)
244
+ # When building under Couchbase Server we've already detected
245
+ # and set the appropriate OpenSSL variables
246
+ IF(APPLE)
247
+ IF(NOT OpenSSL_DIR)
248
+ EXECUTE_PROCESS(COMMAND brew --prefix openssl
249
+ OUTPUT_VARIABLE OPENSSL_ROOT_DIR
250
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
251
+ MESSAGE(STATUS "Found OpenSSL Prefix: ${OPENSSL_ROOT_DIR}")
252
+ ENDIF()
238
253
  ENDIF()
239
- ENDIF()
240
- FIND_PACKAGE(OpenSSL)
254
+ FIND_PACKAGE(OpenSSL)
255
+ ENDIF(NOT OPENSSL_FOUND)
256
+
241
257
  IF(OPENSSL_FOUND)
242
258
  MESSAGE(STATUS "SSL Found")
243
259
  ELSE()
244
- MESSAGE(STATUS "SSL Not Found")
260
+ MESSAGE(STATUS "SSL Not Found. SSL support will be disabled")
261
+ ADD_DEFINITIONS(-DLCB_NO_SSL=1)
245
262
  ENDIF()
246
263
  ENDIF()
247
264
 
@@ -320,12 +337,14 @@ ELSE()
320
337
  SET_TARGET_PROPERTIES(couchbase PROPERTIES
321
338
  LINK_FLAGS "-compatibility_version ${LCB_SONAME_MAJOR} -current_version ${LCB_SONAME_FULL}"
322
339
  OUTPUT_NAME couchbase.2)
323
- ADD_CUSTOM_COMMAND(TARGET couchbase POST_BUILD
324
- COMMAND rm -f libcouchbase.dylib
325
- COMMAND ln libcouchbase.2.dylib libcouchbase.dylib
326
- WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
327
- INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libcouchbase.dylib
328
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
340
+ IF(NOT LCB_BUILD_STATIC)
341
+ ADD_CUSTOM_COMMAND(TARGET couchbase POST_BUILD
342
+ COMMAND rm -f libcouchbase.dylib
343
+ COMMAND ln libcouchbase.2.dylib libcouchbase.dylib
344
+ WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
345
+ INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libcouchbase.dylib
346
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
347
+ ENDIF()
329
348
  ENDIF()
330
349
 
331
350
  SET_TARGET_PROPERTIES(couchbase PROPERTIES PREFIX "lib")
@@ -334,6 +353,9 @@ SET(LCB_LINK_DEPS ${lcb_plat_libs} ${lcb_ssl_libs} ${LCB_HDR_HISTOGRAM_LINK})
334
353
  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
335
354
  SET(LCB_LINK_DEPS ${LCB_LINK_DEPS} rt)
336
355
  ENDIF()
356
+ IF(LIBPROFILER)
357
+ SET(LCB_LINK_DEPS ${LCB_LINK_DEPS} ${LIBPROFILER})
358
+ ENDIF()
337
359
 
338
360
  TARGET_LINK_LIBRARIES(couchbase ${LCB_LINK_DEPS})
339
361
  TARGET_LINK_LIBRARIES(couchbaseS ${LCB_LINK_DEPS})
@@ -384,20 +406,24 @@ INSTALL(TARGETS couchbase
384
406
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
385
407
  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
386
408
 
387
- INSTALL(DIRECTORY include/libcouchbase ${LCB_GENSRCDIR}/libcouchbase
388
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
389
- FILES_MATCHING PATTERN *.h PATTERN *.c)
409
+ IF(LCB_INSTALL_HEADERS)
410
+ INSTALL(DIRECTORY include/libcouchbase ${LCB_GENSRCDIR}/libcouchbase
411
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
412
+ FILES_MATCHING PATTERN *.h PATTERN *.c)
413
+ ENDIF()
390
414
 
391
415
  INSTALL(DIRECTORY doc/man/ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 FILES_MATCHING PATTERN *.1)
392
416
  INSTALL(DIRECTORY doc/man/ DESTINATION ${CMAKE_INSTALL_MANDIR}/man4 FILES_MATCHING PATTERN *.4)
393
417
 
394
- INSTALL_PDBS(couchbase)
418
+ IF(MSVC)
419
+ INSTALL_PDBS(couchbase)
420
+ ENDIF()
395
421
 
396
422
  SET(_lcb_tarname "libcouchbase-${LCB_VERSION}")
397
423
  SET(_lcb_manifest "${LCB_GENINFODIR}/MANIFEST")
398
424
 
399
425
  # pkg-config stuff goes with installation
400
- IF(NOT WIN32)
426
+ IF(NOT WIN32 AND LCB_INSTALL_PKGCONFIG)
401
427
  CONFIGURE_FILE(packaging/libcouchbase.pc.in packaging/libcouchbase.pc @ONLY)
402
428
  INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/libcouchbase.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
403
429
  ENDIF()
@@ -1,75 +1,61 @@
1
1
  # Contributing
2
2
 
3
- In addition to filing bugs, you may contribute by submitting patches
4
- to fix bugs in the library. Contributions may be submitting to
5
- <http://review.couchbase.com>. We use Gerrit as our code review system -
6
- and thus submitting a change would require an account there. Note that
7
- pull requests will not be ignored but will be responded to much quicker
8
- once they are converted into Gerrit.
9
-
10
- For something to be accepted into the codebase, it must be formatted
11
- properly and have undergone proper testing. While there are no formatting
12
- guidelines per se, the code should look similar to the existing code
13
- within the library.
3
+ In addition to filing bugs, you may contribute by submitting patches to fix bugs in the library. Contributions may be
4
+ submitting to <http://review.couchbase.com>. We use Gerrit as our code review system - and thus submitting a change
5
+ would require an account there. Note that pull requests will not be ignored but will be responded to much quicker once
6
+ they are converted into Gerrit.
7
+
8
+ For something to be accepted into the codebase, it must be formatted properly and have undergone proper testing. While
9
+ there are no formatting guidelines per se, the code should look similar to the existing code within the library.
14
10
 
15
11
  ## Branches and Tags
16
12
 
17
- Released versions of the library are marked as annotated tags inside
18
- the repository.
13
+ Released versions of the library are marked as annotated tags inside the repository.
19
14
 
20
- * The `release10` contains the older 1.x versions of the library.
21
- * The `release23` contains the current 2.3.x maintenance branch
22
- * The `master` branch represents the mainline branch. The master
23
- branch typically consists of content going into the next release.
15
+ * The `master` branch represents the mainline branch. The master branch typically consists of content going into the
16
+ next release.
24
17
 
25
18
  ## Contributing Patches
26
19
 
27
- If you wish to contribute a new feature or a bug fix to the library, try to follow
28
- the following guidelines to help ensure your change gets merged upstream.
20
+ If you wish to contribute a new feature or a bug fix to the library, try to follow the following guidelines to help
21
+ ensure your change gets merged upstream.
29
22
 
30
23
  ### Before you begin
31
24
 
32
- For any code change, ensure the new code you write looks similar to the code
33
- surrounding it. We have no strict code style policies, but do request that your
34
- code stand out as little as possible from its surrounding neighborhood (unless
25
+ For any code change, ensure the new code you write looks similar to the code surrounding it. We have no strict code
26
+ style policies, but do request that your code stand out as little as possible from its surrounding neighborhood (unless
35
27
  of course your change is stylistic in nature).
36
28
 
37
- If your change is going to involve a substantial amount of time or effort, please
38
- attempt to discuss it with the project developers first who will provide assistance
39
- and direction where possible.
29
+ If your change is going to involve a substantial amount of time or effort, please attempt to discuss it with the project
30
+ developers first who will provide assistance and direction where possible.
40
31
 
41
- Additionally, note that the library uses C89 (AKA "ANSI C") with some extensions
42
- that are known to work on both GCC and Visual Studio. Please ensure your code
43
- conforms to this, unless the new code is specific to a given platform.
32
+ Additionally, note that the library uses C89 (AKA "ANSI C") with some extensions that are known to work on both GCC and
33
+ Visual Studio for `.c` files, and C++11 for `.cc` files. Please ensure your code conforms to this, unless the new code
34
+ is specific to a given platform.
44
35
 
45
36
  #### For new features
46
37
 
47
- Ensure the feature you are adding does not already exist, and think about how
48
- this feature may be useful for other users. In general less intrusive changes
49
- are more likely to be accepted.
38
+ Ensure the feature you are adding does not already exist, and think about how this feature may be useful for other
39
+ users. In general less intrusive changes are more likely to be accepted.
50
40
 
51
41
  #### For fixing bugs
52
42
 
53
- Ensure the bug you are fixing is actually a bug (and not a usage) error, and
54
- that it has not been fixed in a more recent version. Please read the release
55
- notes as well as the issue tracker to see a list of open and resolved issues.
43
+ Ensure the bug you are fixing is actually a bug (and not a usage) error, and that it has not been fixed in a more recent
44
+ version. Please read the release notes as well as the issue tracker to see a list of open and resolved issues.
56
45
 
57
46
  ### Code Review
58
47
 
59
48
  #### Signing up on Gerrit
60
49
 
61
- Everything that is merged into the library goes through a code review process.
62
- The code review process is done via [Gerrit](http://review.couchbase.org)
63
- (Unfortunately we cannot merge pull requests, though it is fairly simple to
64
- convert a pull request to gerrit, as seen later. If you know a way to integrate
65
- pull requests with Gerrit, please let us know).
66
-
67
- To sign up for a gerrit account, go to http://review.couchbase.org and click
68
- on the _Register_ link at the top right. Once you've signed in you will need
69
- to sign the CLA (Contributor License Agreement) by going you your gerrit account
70
- page and selecting the _Agreements_ link on the left. When you've done that, be
71
- sure to notify us in IRC (at _#libcouchbase_) and/or send an email to
72
- **matt**AT**couchbase**DOTCOM as you will require manual approval before being
50
+ Everything that is merged into the library goes through a code review process. The code review process is done via
51
+ [Gerrit](http://review.couchbase.org) (Unfortunately we cannot merge pull requests, though it is fairly simple to
52
+ convert a pull request to gerrit, as seen later. If you know a way to integrate pull requests with Gerrit, please let us
53
+ know).
54
+
55
+ To sign up for a gerrit account, go to http://review.couchbase.org and click on the _Register_ link at the top
56
+ right. Once you've signed in you will need to sign the CLA (Contributor License Agreement) by going you your gerrit
57
+ account page and selecting the _Agreements_ link on the left. When you've done that, be sure to notify us in IRC (at
58
+ _#libcouchbase_) and/or send an email to **matt**AT**couchbase**DOTCOM as you will require manual approval before being
73
59
  able to submit a request for change.
74
60
 
75
61
  Once approved, you should add your public SSH key to gerrit.
@@ -90,35 +76,30 @@ $ scp -P 29418 ${USERNAME}@review.couchbase.org:hooks/commit-msg .git/hooks
90
76
  $ chmod a+x .git/hooks/commit-msg
91
77
  ```
92
78
 
93
- The last change is required for annotating each commit message with a special
94
- header known as `Change-Id`. This allows Gerrit to group together different
95
- revisions of the same patch.
79
+ The last change is required for annotating each commit message with a special header known as `Change-Id`. This allows
80
+ Gerrit to group together different revisions of the same patch.
96
81
 
97
82
  #### Pushing a changeset
98
83
 
99
- Now that you have your change and a gerrit account to push to, you need to
100
- upload the change for review. To do so, invoke the following incantation:
84
+ Now that you have your change and a gerrit account to push to, you need to upload the change for review. To do so,
85
+ invoke the following incantation:
101
86
 
102
87
  ```
103
88
  $ git push gerrit HEAD:refs/for/master
104
89
  ```
105
90
 
106
- Where `gerrit` is the name of the _remote_ added earlier. You may encounter
107
- some errors when pushing. The most common are:
91
+ Where `gerrit` is the name of the _remote_ added earlier. You may encounter some errors when pushing. The most common
92
+ are:
108
93
 
109
- * "You are not authorized to push to this repository". You will get this if your
110
- account has not yet been approved.
111
- * "Missing Change-Id". You need to install the `commit-msg` hook as described above.
112
- Note that even once you do this, you will need to ensure that any prior commits
113
- already have this header - this may be done by doing an interactive rebase (e.g.
114
- `git rebase -i origin/master` and selecting `reword` for all the commits; which
115
- will automatically fill in the Change-Id).
94
+ * "You are not authorized to push to this repository". You will get this if your account has not yet been approved.
95
+ * "Missing Change-Id". You need to install the `commit-msg` hook as described above. Note that even once you do this,
96
+ you will need to ensure that any prior commits already have this header - this may be done by doing an interactive
97
+ rebase (e.g. `git rebase -i origin/master` and selecting `reword` for all the commits; which will automatically fill
98
+ in the Change-Id).
116
99
 
117
100
 
118
- Once you've pushed your changeset you can add people to review. Currently these
119
- are:
101
+ Once you've pushed your changeset you can add people to review. Currently these are:
120
102
 
121
- * Mark Nunberg
122
- * Brett Lawson
123
103
  * Sergey Avseyev
124
-
104
+ * Brett Lawson
105
+ * Ellis Breen
@@ -1,5 +1,168 @@
1
1
  # Release Notes
2
2
 
3
+ ## 2.9.5 (September 21 2018)
4
+
5
+ * [CCBC-980](https://issues.couchbase.com/browse/CCBC-980): Make idle timeout
6
+ for HTTP pool tunable
7
+
8
+ * [CCBC-977](https://issues.couchbase.com/browse/CCBC-977): Update
9
+ documentation analytics. Add example demonstrating analytics queries
10
+
11
+ * [CCBC-968](https://issues.couchbase.com/browse/CCBC-968): Improve log message
12
+ for `SELECT_BUCKET` on `EACCESS`. Add note saying that this error code might
13
+ be because of missing bucket.
14
+
15
+ * [CCBC-976](https://issues.couchbase.com/browse/CCBC-976): Keep HTTP
16
+ connections pooled after `lcb_ping3`
17
+
18
+ * [CCBC-975](https://issues.couchbase.com/browse/CCBC-975): Make sure kv
19
+ service is only enabled if in nodes list.
20
+
21
+ * [CCBC-972](https://issues.couchbase.com/browse/CCBC-972): Fix memory issues
22
+ reported by valgrind
23
+
24
+ * [CCBC-973](https://issues.couchbase.com/browse/CCBC-974): Correctly convert
25
+ non-null terminated tag buffers to `Json::Value`
26
+
27
+ ## 2.9.4 (August 29 2018)
28
+
29
+ * [CCBC-970](https://issues.couchbase.com/browse/CCBC-970): Update list of retriable errors for
30
+ analytics
31
+
32
+ * [CCBC-965](https://issues.couchbase.com/browse/CCBC-965): Update log level in config cache
33
+ provider
34
+
35
+ * [CCBC-967](https://issues.couchbase.com/browse/CCBC-967): optimize Threshold Tracer queues/sorting
36
+
37
+ * [CCBC-963](https://issues.couchbase.com/browse/CCBC-963): remove global state from random
38
+ generator, and make it thread-safe.
39
+
40
+ * [CCBC-966](https://issues.couchbase.com/browse/CCBC-966): return current network for
41
+ LCB_CNTL_NETWORK
42
+
43
+ * [CCBC-969](https://issues.couchbase.com/browse/CCBC-969): Allow to skip version from git tags
44
+
45
+ * [CCBC-961](https://issues.couchbase.com/browse/CCBC-961): Add examples for FTS queries
46
+
47
+ * [CCBC-971](https://issues.couchbase.com/browse/CCBC-971): disable dead socket detection for older
48
+ libuv (fixes build on platforms, where old libuv-dev package installed).
49
+
50
+ * Report HELO features to logger in the single line.
51
+
52
+ * Allow to select compression mode in connection string. This might be useful for debugging
53
+ purposes. For example, to bypass inflation step when receiving data.
54
+
55
+ $ CONNSTRING=couchbase://localhost/default?compression=deflate_only
56
+ $ cbc cat -U $CONNSTRING 00000000.json > bindoc.dat
57
+ 00000000.json CAS=0x15431f831dc60000, Flags=0x0, Size=739, Datatype=0x03(JSON,SNAPPY)
58
+
59
+ ## 2.9.3 (July 18 2018)
60
+
61
+ * [CCBC-955](https://issues.couchbase.com/browse/CCBC-955): Parse uint32 as
62
+ unsigned ints instead of timeouts. Some settings were interpreted as time
63
+ values, while they should not (e.g. console_log_level, compression_min_size
64
+ etc). This issue forced the library to misinterpret user input (converter was
65
+ multiplying all values to 1000000, e.g. log level was always TRACE).
66
+
67
+ * [CCBC-957](https://issues.couchbase.com/browse/CCBC-957): Automatically
68
+ disable SSL support, when OpenSSL is unavailable.
69
+
70
+ * [CCBC-954](https://issues.couchbase.com/browse/CCBC-954): Define EFTYPE
71
+ error code if it does not exist. Fixes support of libuv 1.21 and higher.
72
+
73
+ * [CCBC-951](https://issues.couchbase.com/browse/CCBC-951): Remove
74
+ experimental warning from subdoc API.
75
+
76
+ * [CCBC-948](https://issues.couchbase.com/browse/CCBC-948): Consider retry
77
+ queue with only 0xb5 as empty. This allows a breakout from lcb_wait earlier
78
+ (when application operates in synchronous style). The old behavior, where
79
+ lcb_wait does not breakout until the library gets the first successful
80
+ configuration, still can be restored with `lcb_cntl(...,
81
+ LCB_CNTL_WAIT_FOR_CONFIG, ...)`.
82
+
83
+ * [CCBC-939](https://issues.couchbase.com/browse/CCBC-939): Optimize
84
+ the performance of built-in tracer. It now uses sllist for tags container
85
+ instead of Json::Value.
86
+
87
+ * [CCBC-958](https://issues.couchbase.com/browse/CCBC-958): Check tracing span
88
+ tags argument more pedantically and return error if arguments are not valid.
89
+
90
+ * [CCBC-956](https://issues.couchbase.com/browse/CCBC-956): Combine operation
91
+ id and name into single field in the threshold tracer.
92
+
93
+ * [CCBC-949](https://issues.couchbase.com/browse/CCBC-949): Do not hardcode
94
+ libevent dependencies in DEB packages. Instead let `dh_shlibdeps` script to
95
+ detect dependencies for each platform. This fixes a usless dependency on libevent-1
96
+ for ubuntu 18.04.
97
+
98
+ * [CCBC-947](https://issues.couchbase.com/browse/CCBC-947): Fix build scripts
99
+ for examples (when built with `-DLCB_BUILD_EXAMPLES=ON`).
100
+
101
+ And other small fixes and improvements.
102
+
103
+ ## 2.9.2 (June 22 2018)
104
+
105
+ * [CCBC-946](https://issues.couchbase.com/browse/CCBC-946): Restore broken ABI in 360ea68ef7738d543bbd3feac3f2c3c6c8ff976b
106
+
107
+ ## 2.9.1 (June 22 2018)
108
+
109
+ * [CCBC-942](https://issues.couchbase.com/browse/CCBC-942): Expose new error
110
+ codes for subdocument operations.
111
+
112
+ * [CCBC-866](https://issues.couchbase.com/browse/CCBC-866): Check cached
113
+ provider isn't NULL.
114
+
115
+ * [CCBC-890](https://issues.couchbase.com/browse/CCBC-890): Always check if SSL
116
+ used when getting ports.
117
+
118
+ * [CCBC-945](https://issues.couchbase.com/browse/CCBC-945): Allow to specify
119
+ logger in lcb_create().
120
+
121
+ * [CCBC-935](https://issues.couchbase.com/browse/CCBC-935): Display orphan
122
+ tracer report on WARN log level.
123
+
124
+ * [CCBC-936](https://issues.couchbase.com/browse/CCBC-936): Update default
125
+ tracing interval to 10 seconds.
126
+
127
+ * [CCBC-937](https://issues.couchbase.com/browse/CCBC-937): Implement support
128
+ for alternate addresses.
129
+
130
+ * [CCBC-943](https://issues.couchbase.com/browse/CCBC-943): Implement option to
131
+ dump TCP packets.
132
+
133
+ This change introduces new cmake option, which will force library to report
134
+ all incoming/outgoing TCP packets on TRACE log level. It renders the bytes
135
+ in Base64 encoding.
136
+
137
+ Also there is simple extraction tool, which beautifies packet traces, and
138
+ could be used like this:
139
+
140
+ cbc cat -vvv foo bar 2>&1 | tools/extract-packets.rb
141
+
142
+ ## 2.9.0 (May 24 2018)
143
+
144
+ This release is mostly about API visibility bump from uncommited to committed,
145
+ but also includes several bug fixes.
146
+
147
+ * [CCBC-930](https://issues.couchbase.com/browse/CCBC-930): Dump threshold
148
+ logging tracer queues before destroying the tracer.
149
+
150
+ * Updates in crypto API as per RFC. This basically change of the API (ABI has
151
+ preserved compatible, but `v0` crypto API will return runtime error with 2.9.0
152
+ library. From this release, all encryption key management encapsulated into
153
+ crypto provider, so it does not need to expose key loader interface. In
154
+ addition, that user API is changed to conform RFC, and use noun `fields`
155
+ instead of `document` (e.g. `lcbcrypt_encrypt_fields`).
156
+
157
+ * [CCBC-925](https://issues.couchbase.com/browse/CCBC-925): Fix existence checks
158
+ for registered crypto providers.
159
+
160
+ * [CCBC-924](https://issues.couchbase.com/browse/CCBC-924): Initialize flag for
161
+ JSON server feature. Otherwise it might be left uninitialized and the library
162
+ will send JSON datatype to servers, which do not support it.
163
+
164
+ * [PCBC-543](https://issues.couchbase.com/browse/PCBC-543), [CCBC-932](https://issues.couchbase.com/browse/CCBC-932), [CCBC-933](https://issues.couchbase.com/browse/CCBC-933): Update log levels
165
+
3
166
  ## 2.8.7 (May 2 2018)
4
167
 
5
168
  * [CCBC-917](https://issues.couchbase.com/browse/CCBC-917): Add tracing for