couchbase 1.3.4-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.travis.yml +22 -0
- data/.yardopts +5 -0
- data/CONTRIBUTING.markdown +75 -0
- data/Gemfile +4 -0
- data/LICENSE +201 -0
- data/Makefile +3 -0
- data/README.markdown +649 -0
- data/RELEASE_NOTES.markdown +796 -0
- data/Rakefile +20 -0
- data/couchbase.gemspec +49 -0
- data/examples/chat-em/Gemfile +7 -0
- data/examples/chat-em/README.markdown +45 -0
- data/examples/chat-em/server.rb +82 -0
- data/examples/chat-goliath-grape/Gemfile +5 -0
- data/examples/chat-goliath-grape/README.markdown +50 -0
- data/examples/chat-goliath-grape/app.rb +67 -0
- data/examples/chat-goliath-grape/config/app.rb +20 -0
- data/examples/transcoders/Gemfile +3 -0
- data/examples/transcoders/README.markdown +59 -0
- data/examples/transcoders/cb-zcat +40 -0
- data/examples/transcoders/cb-zcp +45 -0
- data/examples/transcoders/gzip_transcoder.rb +49 -0
- data/examples/transcoders/options.rb +54 -0
- data/ext/couchbase_ext/.gitignore +4 -0
- data/ext/couchbase_ext/arguments.c +956 -0
- data/ext/couchbase_ext/arithmetic.c +307 -0
- data/ext/couchbase_ext/bucket.c +1370 -0
- data/ext/couchbase_ext/context.c +65 -0
- data/ext/couchbase_ext/couchbase_ext.c +1364 -0
- data/ext/couchbase_ext/couchbase_ext.h +644 -0
- data/ext/couchbase_ext/delete.c +163 -0
- data/ext/couchbase_ext/eventmachine_plugin.c +452 -0
- data/ext/couchbase_ext/extconf.rb +168 -0
- data/ext/couchbase_ext/get.c +316 -0
- data/ext/couchbase_ext/gethrtime.c +129 -0
- data/ext/couchbase_ext/http.c +432 -0
- data/ext/couchbase_ext/multithread_plugin.c +1090 -0
- data/ext/couchbase_ext/observe.c +171 -0
- data/ext/couchbase_ext/plugin_common.c +171 -0
- data/ext/couchbase_ext/result.c +129 -0
- data/ext/couchbase_ext/stats.c +163 -0
- data/ext/couchbase_ext/store.c +542 -0
- data/ext/couchbase_ext/timer.c +192 -0
- data/ext/couchbase_ext/touch.c +186 -0
- data/ext/couchbase_ext/unlock.c +176 -0
- data/ext/couchbase_ext/utils.c +551 -0
- data/ext/couchbase_ext/version.c +142 -0
- data/lib/action_dispatch/middleware/session/couchbase_store.rb +38 -0
- data/lib/active_support/cache/couchbase_store.rb +430 -0
- data/lib/couchbase.rb +155 -0
- data/lib/couchbase/bucket.rb +457 -0
- data/lib/couchbase/cluster.rb +119 -0
- data/lib/couchbase/connection_pool.rb +58 -0
- data/lib/couchbase/constants.rb +12 -0
- data/lib/couchbase/result.rb +26 -0
- data/lib/couchbase/transcoder.rb +120 -0
- data/lib/couchbase/utils.rb +62 -0
- data/lib/couchbase/version.rb +21 -0
- data/lib/couchbase/view.rb +506 -0
- data/lib/couchbase/view_row.rb +272 -0
- data/lib/ext/multi_json_fix.rb +56 -0
- data/lib/rack/session/couchbase.rb +108 -0
- data/tasks/benchmark.rake +6 -0
- data/tasks/compile.rake +158 -0
- data/tasks/test.rake +100 -0
- data/tasks/util.rake +21 -0
- data/test/profile/.gitignore +1 -0
- data/test/profile/Gemfile +6 -0
- data/test/profile/benchmark.rb +195 -0
- data/test/setup.rb +178 -0
- data/test/test_arithmetic.rb +185 -0
- data/test/test_async.rb +316 -0
- data/test/test_bucket.rb +250 -0
- data/test/test_cas.rb +235 -0
- data/test/test_couchbase.rb +77 -0
- data/test/test_couchbase_connection_pool.rb +77 -0
- data/test/test_couchbase_rails_cache_store.rb +361 -0
- data/test/test_delete.rb +120 -0
- data/test/test_errors.rb +82 -0
- data/test/test_eventmachine.rb +70 -0
- data/test/test_format.rb +164 -0
- data/test/test_get.rb +407 -0
- data/test/test_stats.rb +57 -0
- data/test/test_store.rb +216 -0
- data/test/test_timer.rb +42 -0
- data/test/test_touch.rb +97 -0
- data/test/test_unlock.rb +119 -0
- data/test/test_utils.rb +58 -0
- data/test/test_version.rb +52 -0
- metadata +336 -0
@@ -0,0 +1,796 @@
|
|
1
|
+
# Release Notes
|
2
|
+
|
3
|
+
This document is a list of user visible feature changes and important
|
4
|
+
bugfixes. Do not forget to update this doc in every important patch.
|
5
|
+
|
6
|
+
## 1.3.4 (2014-01-08)
|
7
|
+
|
8
|
+
* [major] Build 64-bit versions of the extensions for Windows
|
9
|
+
platform. Also support ruby 2.0 and 2.1.
|
10
|
+
|
11
|
+
* [minor] Update hacking section in README
|
12
|
+
|
13
|
+
* [minor] Fix gemspec warnings regarding versions of the dependencies.
|
14
|
+
Now it honours semantic versioning and doesn't use strict versions.
|
15
|
+
|
16
|
+
* [major] RCBC-151 Return CAS in extended mode for incr/decr
|
17
|
+
|
18
|
+
* [minor] RCBC-150 Update list of options on `Cluster.create_bucket`.
|
19
|
+
Added new options: `:replica_index`, `:flush_enabled`,
|
20
|
+
`:parallel_db_and_view_compaction`.
|
21
|
+
|
22
|
+
* [major] Allow retries on Couchbase::Bucket#cas collisions. Now it
|
23
|
+
takes a `:retry` Fixnum option that specifies the maximum number of
|
24
|
+
times the method should retry the entire get/update/set operation
|
25
|
+
when a `Couchbase::Error::KeyExists` error is encountered due to a
|
26
|
+
concurrent update from another writer between its `#get` and `#set`
|
27
|
+
calls.
|
28
|
+
|
29
|
+
* [major] MD5 and truncate ActiveSupport::Cache keys that are longer
|
30
|
+
than 250 characters.
|
31
|
+
|
32
|
+
## 1.3.3 (2013-09-12)
|
33
|
+
|
34
|
+
* [major] RCBC-134 Allow application to use several connections with
|
35
|
+
thread-local singleton.
|
36
|
+
|
37
|
+
* [major] RCBC-135 Fixed invalid memory access which was detected by
|
38
|
+
using 'GC.stress = true' in tests.
|
39
|
+
|
40
|
+
* [major] RCBC-141 Initialize event indexes correctly. The plugin
|
41
|
+
didn't trace event callbacks, which might lead to invalid memory
|
42
|
+
access during rebalance, where libcouchbase creates/removes a lot of
|
43
|
+
events because of a fast-changing topology.
|
44
|
+
|
45
|
+
* [major] RCBC-137 Add selection options for new IO engines: select
|
46
|
+
and iocp.
|
47
|
+
|
48
|
+
* [major] When setting the username field, check for password
|
49
|
+
presence. Fixes segmentation fault in this code:
|
50
|
+
|
51
|
+
Couchbase.connect(:username => "default", :bucket => "default")
|
52
|
+
|
53
|
+
* [minor] Allow to determine the version of libcouchbase:
|
54
|
+
|
55
|
+
Couchbase.libcouchbase_version
|
56
|
+
|
57
|
+
* [major] RCBC-136 Build shared object for ruby 2.0 on windows. Also
|
58
|
+
fixes build script when using latest rake and rake-compiler.
|
59
|
+
|
60
|
+
* [minor] Fix deprecation warning on ruby 2.x. On newer versions it
|
61
|
+
should use `rb_thread_call_without_gvl()`.
|
62
|
+
|
63
|
+
ext/couchbase_ext/multithread_plugin.c: In function ‘loop_run_poll’:
|
64
|
+
ext/couchbase_ext/multithread_plugin.c:772:5: warning: ‘rb_thread_blocking_region’ is deprecated (declared at .../2.0.0-p247-dbg/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
|
65
|
+
rb_thread_blocking_region(loop_blocking_poll, args, RUBY_UBF_PROCESS, NULL);
|
66
|
+
|
67
|
+
* [major] Do not try to compile with plugins for Windows platform.
|
68
|
+
|
69
|
+
* [major] Force handle to be NULL on `lcb_create()` failure.
|
70
|
+
`lcb_create()` can leave garbage in the pointer even if the call
|
71
|
+
itself failed. This behaviour could lead to illegal memory access
|
72
|
+
on GC.
|
73
|
+
|
74
|
+
* [minor] Remove usage of `RARRAY_PTR` in favor of `rb_ary_entry`.
|
75
|
+
This improves performance significantly on Rubinius and also
|
76
|
+
improves compatibility with future CRuby 2.1 which introduces
|
77
|
+
generational garbage collection. This results in these arrays not
|
78
|
+
having to be rescanned in Rubinius and not marked as shady in
|
79
|
+
RBGCENC in CRuby 2.1.
|
80
|
+
For more discussion, also see: https://bugs.ruby-lang.org/issues/8399
|
81
|
+
|
82
|
+
## 1.3.2 (2013-07-10)
|
83
|
+
|
84
|
+
* [major] RCBC-133 Allow application to select the strategy of reading
|
85
|
+
from replica nodes. **This version requires libcouchbase >= 2.0.7.**
|
86
|
+
Now three strategies are available:
|
87
|
+
|
88
|
+
* `:first` - synonym to `true`, previous behaviour now the
|
89
|
+
default. It means that the library will sequentially iterate
|
90
|
+
over all replicas in the configuration supplied by the cluster
|
91
|
+
and will return as soon as it finds a successful response, or
|
92
|
+
report an error.
|
93
|
+
|
94
|
+
c.get("foo", :replica => true)
|
95
|
+
c.get("foo", :replica => :first)
|
96
|
+
#=> "bar"
|
97
|
+
c.get("foo", :replica => :first, :extended => true)
|
98
|
+
#=> ["bar", 0, 11218368683493556224]
|
99
|
+
|
100
|
+
* `:all` - query all replicas in parallel. In this case the method
|
101
|
+
will return the array of the values on the all replica nodes without
|
102
|
+
a particular order. Also if the key isn't on the node, it will be
|
103
|
+
skipped in the result array.
|
104
|
+
|
105
|
+
c.get("foo", :replica => :all)
|
106
|
+
#=> ["bar", "bar", "bar"]
|
107
|
+
c.get("foo", :replica => :all, :extended => true)
|
108
|
+
#=> [["bar", 0, 11218368683493556224],
|
109
|
+
# ["bar", 0, 11218368683493556224],
|
110
|
+
# ["bar", 0, 11218368683493556224]]
|
111
|
+
|
112
|
+
* `Fixnum` - you can also select specific replica node by its
|
113
|
+
index in the cluster configuration. It should be in interval
|
114
|
+
`0...c.num_replicas`
|
115
|
+
|
116
|
+
0...c.num_replicas
|
117
|
+
#=> 0...3
|
118
|
+
c.get("foo", :replica => 1)
|
119
|
+
#=> "bar"
|
120
|
+
c.get("foo", :replica => 42)
|
121
|
+
#=> ArgumentError: replica index should be in interval 0...3
|
122
|
+
|
123
|
+
Note that applications should not assume the order of the
|
124
|
+
replicas indicates more recent data is at a lower index number.
|
125
|
+
It is up to the application to determine which version of a
|
126
|
+
document/item it may wish to use in the case of retrieving data
|
127
|
+
from a replica.
|
128
|
+
|
129
|
+
|
130
|
+
## 1.3.1 (2013-06-05)
|
131
|
+
|
132
|
+
* [major] RCBC-131 Couchbase::Cluster instance shouldn't require
|
133
|
+
persistent connection.
|
134
|
+
|
135
|
+
* Fix compatibility with multi_json 1.7.5. They removed VERSION
|
136
|
+
constant
|
137
|
+
|
138
|
+
## 1.3.0 (2013-05-07)
|
139
|
+
|
140
|
+
* [major] RCBC-46 implement Couchbase::ConnectionPool to allow
|
141
|
+
applications (and ActiveSupport::Cache::CouchbaseStore) use it in
|
142
|
+
multi-threaded environment
|
143
|
+
|
144
|
+
* [major] Introduce Transcoders. This mechanism is more flexible, and
|
145
|
+
similar to how other clients encode values.
|
146
|
+
|
147
|
+
* [minor] Deprecate numeric argument to 'default_format'. Instead
|
148
|
+
of this style:
|
149
|
+
|
150
|
+
Couchbase.connect(:default_format => Couchbase::Bucket::FMT_MARSHAL)
|
151
|
+
|
152
|
+
Symbol notation or explicit transcoder entity should be used
|
153
|
+
|
154
|
+
Couchbase.connect(:default_format => :marshal)
|
155
|
+
Couchbase.connect(:transcoder => Couchbase::Transcoder::Marshal)
|
156
|
+
|
157
|
+
## 1.2.3 (2013-04-02)
|
158
|
+
|
159
|
+
* [major] Make ActiveSupport::Cache::CouchbaseStore threadsafe
|
160
|
+
|
161
|
+
* [minor] Check for gethrtime. Needed for solaris/smartos
|
162
|
+
|
163
|
+
* [minor] Update documentation bits regarding SET operations
|
164
|
+
|
165
|
+
## 1.2.2 (2013-02-11)
|
166
|
+
|
167
|
+
* [minor] Bucket#design_docs will return a Hash with DesignDoc
|
168
|
+
instances as a values.
|
169
|
+
|
170
|
+
* [critical] RCBC-104 Data corruption on intensive store operations.
|
171
|
+
The issue could also lead to segfaults.
|
172
|
+
|
173
|
+
* [major] RCBC-118 Alias #total_rows as #total_entries on view result
|
174
|
+
set to match documentation.
|
175
|
+
|
176
|
+
* [minor] View#fetch_all - async method for fetching all records
|
177
|
+
|
178
|
+
conn.run do
|
179
|
+
doc.recent_posts.fetch_all do |posts|
|
180
|
+
do_something_with_all_posts(posts)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
* [major] Allow to use Bucket instance in completely asynchronous
|
185
|
+
environment like this, without blocking on connect:
|
186
|
+
|
187
|
+
conn = Couchbase.new(:async => true)
|
188
|
+
conn.run do
|
189
|
+
conn.on_connect do |res|
|
190
|
+
if res.success?
|
191
|
+
#
|
192
|
+
# schedule async requests
|
193
|
+
#
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
* [major] RCBC-27 EventMachine plugin to integrate with EventMachine
|
199
|
+
library. Note that the plugin is experimental at this stage.
|
200
|
+
Example:
|
201
|
+
|
202
|
+
require 'eventmachine'
|
203
|
+
require 'couchbase'
|
204
|
+
|
205
|
+
EM.epoll = true if EM.epoll?
|
206
|
+
EM.kqueue = true if EM.kqueue?
|
207
|
+
EM.run do
|
208
|
+
con = Couchbase.connect(:engine => :eventmachine, :async => true)
|
209
|
+
con.on_connect do |res|
|
210
|
+
puts "connected: #{res.inspect}"
|
211
|
+
if res.success?
|
212
|
+
con.set("emfoo", "bar") do |res|
|
213
|
+
puts "set: #{res.inspect}"
|
214
|
+
con.get("emfoo") do |res|
|
215
|
+
puts "get: #{res.inspect}"
|
216
|
+
EM.stop
|
217
|
+
end
|
218
|
+
end
|
219
|
+
else
|
220
|
+
EM.stop
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
|
226
|
+
## 1.2.1 (2012-12-28)
|
227
|
+
|
228
|
+
* [major] RCBC-101 Persistence constraints wasn't passed to mutation
|
229
|
+
methods, so they haven't been applied properly.
|
230
|
+
|
231
|
+
* [major] RCBC-102 Inconsistent return values in case of storage
|
232
|
+
functions with persistence constraints. It always return a Hash like
|
233
|
+
in case of multi-set, even if there is only one document is being
|
234
|
+
set.
|
235
|
+
|
236
|
+
* [minor] Improve internal structures of multi-threaded IO plugin to
|
237
|
+
protect it from memory leaks when the Fiber object is forgotten.
|
238
|
+
|
239
|
+
## 1.2.0 (2012-12-12)
|
240
|
+
|
241
|
+
30 files changed, 2079 insertions(+), 662 deletions(-)
|
242
|
+
|
243
|
+
* Specialized io plugin for releasing Ruby GVL (thanks to
|
244
|
+
Sokolov Yura aka funny_falcon).
|
245
|
+
|
246
|
+
* Ruby 1.9.x uses global lock for ensuring integrity, and blocking
|
247
|
+
calls should be called inside rb_thread_blocking_region to allow
|
248
|
+
other threads to be runned.
|
249
|
+
|
250
|
+
* Ruby 1.8.7 have only green threads, so that rb_thread_schedule
|
251
|
+
should be called manually.
|
252
|
+
|
253
|
+
* RCBC-42 Catch exceptions from ruby callbacks
|
254
|
+
|
255
|
+
* RCBC-99 read out the StringIO contents in json gem monkey patch
|
256
|
+
|
257
|
+
* Use marshal serializer by default for session store
|
258
|
+
|
259
|
+
* Remove debugger development dependency
|
260
|
+
|
261
|
+
* Fix memory leaks and performance improvements
|
262
|
+
|
263
|
+
## 1.2.0.z.beta5 (2012-11-29)
|
264
|
+
|
265
|
+
25 files changed, 1419 insertions(+), 1230 deletions(-)
|
266
|
+
|
267
|
+
* RCBC-95 Use response body to clarify Couchbase::Error::HTTP
|
268
|
+
|
269
|
+
* Fix memory leaks: in async mode context wasn't freed
|
270
|
+
|
271
|
+
* Allow to setup default initial value for INCR/DECR on per connection
|
272
|
+
level.
|
273
|
+
|
274
|
+
* Make error message about libcouchbase dependency more verbose
|
275
|
+
|
276
|
+
## 1.2.0.z.beta4 (2012-11-21)
|
277
|
+
|
278
|
+
27 files changed, 311 insertions(+), 123 deletions(-)
|
279
|
+
|
280
|
+
* Increase default connection timeout for Views up to 75 seconds
|
281
|
+
|
282
|
+
* RCBC-94 Reset global exception after usage
|
283
|
+
|
284
|
+
* RCBC-89 Do not expose docs embedded in HTTP response. Use binary
|
285
|
+
protocol for it.
|
286
|
+
|
287
|
+
* Remove all_docs mentions. It isn't recommended to use it because of
|
288
|
+
performance issues
|
289
|
+
|
290
|
+
* Protect against non string values in :plain mode. Will raise error
|
291
|
+
if the value given isn't a string.
|
292
|
+
|
293
|
+
* RCBC-90 Update documentation about session store
|
294
|
+
|
295
|
+
* Make rack session store adapter quiet
|
296
|
+
|
297
|
+
* Update to recent libcouchbase API
|
298
|
+
|
299
|
+
* Adjust version check for MultiJson monkeypatch (8098da1)
|
300
|
+
|
301
|
+
* Do not hide ValueFormat reason. It is accessible using
|
302
|
+
Couchbase::Error::Value#inner_exception.
|
303
|
+
|
304
|
+
## 1.2.0.z.beta3 (2012-10-16)
|
305
|
+
|
306
|
+
18 files changed, 241 insertions(+), 57 deletions(-)
|
307
|
+
|
308
|
+
* RCBC-52 Implement bucket create/delete operations. Examples:
|
309
|
+
|
310
|
+
conn = Couchbase::Cluster.new(:hostname => "localhost",
|
311
|
+
:username => "Administrator", :password => "secret")
|
312
|
+
conn.create_bucket("my_protected_bucket",
|
313
|
+
:ram_quota => 500, # megabytes
|
314
|
+
:sasl_password => "s3cr3tBuck3t")
|
315
|
+
|
316
|
+
* Propagate status code for HTTP responses
|
317
|
+
|
318
|
+
* RCBC-87 Fix build error on Mac OS X
|
319
|
+
|
320
|
+
* Use global scope to find Error classes (thanks to @wr0ngway)
|
321
|
+
|
322
|
+
* Fix memory leaks
|
323
|
+
|
324
|
+
* Update to recent libcouchbase API
|
325
|
+
|
326
|
+
## 1.2.0.z.beta2 (2012-09-21)
|
327
|
+
|
328
|
+
3 files changed, 6 insertions(+), 2 deletions(-)
|
329
|
+
|
330
|
+
* RCBC-82 Not all rubies are fat on Mac OS X. Fixes build there
|
331
|
+
|
332
|
+
## 1.2.0.z.beta (2012-09-18)
|
333
|
+
|
334
|
+
2 files changed, 5 insertions(+), 1 deletion(-)
|
335
|
+
|
336
|
+
* Fix version ordering by using ".z" prefix before .beta. The problem
|
337
|
+
is that DP (Developer Preview) should have lower precedence than
|
338
|
+
Beta, but alphabetially ".beta" orders before ".dp". This is why
|
339
|
+
further Beta versions have ".z".
|
340
|
+
|
341
|
+
## 1.2.0.beta (2012-09-18)
|
342
|
+
|
343
|
+
51 files changed, 9301 insertions(+), 3364 deletions(-)
|
344
|
+
|
345
|
+
* RCBC-81 Protect against NoMethodError in extconf.rb. Fixes
|
346
|
+
gem installation
|
347
|
+
|
348
|
+
* RCBC-79 Use RESTful flush
|
349
|
+
|
350
|
+
* Various build fixes
|
351
|
+
|
352
|
+
* Add attribute reader for Error::Base status code
|
353
|
+
|
354
|
+
* CCBC-98 Expose client temporary failure error
|
355
|
+
|
356
|
+
* RCBC-28 Implement Bucket#unlock
|
357
|
+
|
358
|
+
# Unlock the single key
|
359
|
+
val, _, cas = c.get("foo", :lock => true, :extended => true)
|
360
|
+
c.unlock("foo", :cas => cas)
|
361
|
+
|
362
|
+
# Unlock several keys
|
363
|
+
c.unlock("foo" => cas1, :bar => cas2)
|
364
|
+
#=> {"foo" => true, "bar" => true}
|
365
|
+
|
366
|
+
* Fix CAS conversion for Bucket#delete method for 32-bit systems
|
367
|
+
|
368
|
+
## 1.1.5 (2012-09-17)
|
369
|
+
|
370
|
+
3 files changed, 9 insertions(+), 5 deletions(-)
|
371
|
+
|
372
|
+
* RCBC-81 Fixed installing issue on Mac OS X.
|
373
|
+
|
374
|
+
## 1.1.4 (2012-08-30)
|
375
|
+
|
376
|
+
5 files changed, 64 insertions(+), 30 deletions(-)
|
377
|
+
|
378
|
+
* RCBC-37 Allow to pass intial list of nodes which will allow to
|
379
|
+
iterate addresses until alive node will be found.
|
380
|
+
|
381
|
+
Couchbase.connect(:node_list => ['example.com:8091', 'example.org:8091', 'example.net'])
|
382
|
+
|
383
|
+
* RCBC-70 Fixed UTF-8 in the keys. Original discussion
|
384
|
+
https://groups.google.com/d/topic/couchbase/bya0lSf9uGE/discussion
|
385
|
+
|
386
|
+
## 1.2.0.dp6 (2012-06-28)
|
387
|
+
|
388
|
+
21 files changed, 1520 insertions(+), 428 deletions(-)
|
389
|
+
|
390
|
+
* RCBC-47 Allow to skip username for protected buckets. The will use
|
391
|
+
bucket name for credentials.
|
392
|
+
|
393
|
+
* Expose number of replicas to the user
|
394
|
+
|
395
|
+
* RCBC-6 Implement Bucket#observe command to query durable state.
|
396
|
+
Examples:
|
397
|
+
|
398
|
+
# Query state of single key
|
399
|
+
c.observe("foo")
|
400
|
+
#=> [#<Couchbase::Result:0x00000001650df0 ...>, ...]
|
401
|
+
|
402
|
+
# Query state of multiple keys
|
403
|
+
keys = ["foo", "bar"]
|
404
|
+
stats = c.observe(keys)
|
405
|
+
stats.size #=> 2
|
406
|
+
stats["foo"] #=> [#<Couchbase::Result:0x00000001650df0 ...>, ...]
|
407
|
+
|
408
|
+
* RCBC-49 Storage functions with durability requirements
|
409
|
+
|
410
|
+
# Ensure that the key will be persisted at least on the one node
|
411
|
+
c.set("foo", "bar", :observe => {:persisted => 1})
|
412
|
+
|
413
|
+
* RCBC-50 Allow to read keys from replica
|
414
|
+
|
415
|
+
* RCBC-57 Expose timers API from libcouchbase
|
416
|
+
|
417
|
+
* RCBC-59 Replicate flags in Bucket#cas operation
|
418
|
+
|
419
|
+
* Apply timeout value before connection. Currently libcouchbase shares
|
420
|
+
timeouts for connection and IO operations. This patch allows to
|
421
|
+
setup timeout on the instantiating the connection.
|
422
|
+
|
423
|
+
* RCBC-39 Allow to specify delta for incr/decr in options
|
424
|
+
|
425
|
+
* RCBC-40 Fix Bucket#cas operation behaviour in async mode. The
|
426
|
+
callback of the Bucket#cas method is triggered only once, when it
|
427
|
+
fetches old value, and it isn't possible to receive notification if
|
428
|
+
the next store operation was successful. Example, append JSON
|
429
|
+
encoded value asynchronously:
|
430
|
+
|
431
|
+
c.default_format = :document
|
432
|
+
c.set("foo", {"bar" => 1})
|
433
|
+
c.run do
|
434
|
+
c.cas("foo") do |val|
|
435
|
+
case val.operation
|
436
|
+
when :get
|
437
|
+
val["baz"] = 2
|
438
|
+
val
|
439
|
+
when :set
|
440
|
+
# verify all is ok
|
441
|
+
puts "error: #{ret.error.inspect}" unless ret.success?
|
442
|
+
end
|
443
|
+
end
|
444
|
+
end
|
445
|
+
c.get("foo") #=> {"bar" => 1, "baz" => 2}
|
446
|
+
|
447
|
+
* RCBC-43 More docs and examples on views
|
448
|
+
|
449
|
+
* RCBC-37 Bootstrapping using multiple nodes
|
450
|
+
|
451
|
+
Couchbase.connect(:node_list => ['example.com:8091', 'example.org:8091', 'example.net'])
|
452
|
+
|
453
|
+
* Inherit StandardError instead RuntimeError for errors
|
454
|
+
|
455
|
+
## 1.2.0.dp5 (2012-06-15)
|
456
|
+
|
457
|
+
12 files changed, 939 insertions(+), 20 deletions(-)
|
458
|
+
|
459
|
+
* Integrate with Rack and Rails session store
|
460
|
+
|
461
|
+
# rack
|
462
|
+
require 'rack/session/couchbase'
|
463
|
+
use Rack::Session::Couchbase
|
464
|
+
|
465
|
+
# rails
|
466
|
+
require 'action_dispatch/middleware/session/couchbase_store'
|
467
|
+
AppName::Application.config.session_store :couchbase_store
|
468
|
+
|
469
|
+
* Implement cache store adapter for Rails
|
470
|
+
|
471
|
+
cache_options = {
|
472
|
+
:bucket => 'protected',
|
473
|
+
:username => 'protected',
|
474
|
+
:password => 'secret',
|
475
|
+
:expires_in => 30.seconds
|
476
|
+
}
|
477
|
+
config.cache_store = :couchbase_store, cache_options
|
478
|
+
|
479
|
+
* Implement key prefix (simple namespacing)
|
480
|
+
|
481
|
+
Couchbase.connect(:key_prefix => "prefix:")
|
482
|
+
|
483
|
+
* Allow to force assembling result Hash for multi-get
|
484
|
+
|
485
|
+
connection.get("foo", "bar")
|
486
|
+
#=> [1, 2]
|
487
|
+
connection.get("foo", "bar", :assemble_hash => true)
|
488
|
+
#=> {"foo" => 1, "bar" => 2}
|
489
|
+
|
490
|
+
## 1.2.0.dp4 (2012-06-07)
|
491
|
+
|
492
|
+
4 files changed, 34 insertions(+), 19 deletions(-)
|
493
|
+
|
494
|
+
* Update Bucket#replace documentation: it accepts :cas option
|
495
|
+
|
496
|
+
* RCBC-36 Fix segfault. Occasional segfault when accessing the
|
497
|
+
results of a View. https://gist.github.com/2883925
|
498
|
+
|
499
|
+
## 1.2.0.dp3 (2012-06-06)
|
500
|
+
|
501
|
+
4 files changed, 22 insertions(+), 4 deletions(-)
|
502
|
+
|
503
|
+
* Fix for multi_json < 1.3.3
|
504
|
+
|
505
|
+
* Break out from event loop for non-chunked responses. View results
|
506
|
+
are chunked by default, so there no problems, but other requests
|
507
|
+
like Bucket#save_design_doc() were "locking" awaiting forever.
|
508
|
+
|
509
|
+
## 1.2.0.dp2 (2012-06-06)
|
510
|
+
|
511
|
+
22 files changed, 859 insertions(+), 253 deletions(-)
|
512
|
+
|
513
|
+
* RCBC-31 Make Bucket#get more consistent. The pattern of using more
|
514
|
+
than one argument to determine if an array should be returned is not
|
515
|
+
idiomatic. Consider the case of a multi-get in an application where
|
516
|
+
I have n items to return. If there happens to be only one item it
|
517
|
+
will be treated differently than if there happens to be 2 items.
|
518
|
+
|
519
|
+
get(["foo"]) #=> ["bar"]
|
520
|
+
get("foo") #=> "bar"
|
521
|
+
get(["x"], :extended => true) #=> {"x"=>["xval", 0, 18336939621176836096]}
|
522
|
+
|
523
|
+
* Use monotonic high resolution clock
|
524
|
+
|
525
|
+
* Implement threshold for outgoing commands
|
526
|
+
|
527
|
+
* Allow to stop event loop from ruby
|
528
|
+
|
529
|
+
* RCBC-35 Fix the View parameters escaping. More info at
|
530
|
+
https://gist.github.com/2775050
|
531
|
+
|
532
|
+
* RCBC-34 Use multi_json gem. json_gem compatibility (require
|
533
|
+
'yajl/json_gem') is notorious for causing all kinds of issues with
|
534
|
+
various gems. The most compatible way to use yajl is to call
|
535
|
+
Yajl::Parser and Yajl::Encoder directly.
|
536
|
+
|
537
|
+
* Allow to block and wait for part of the requests
|
538
|
+
|
539
|
+
* Fixed view iterator. It doesn't lock event loop anymore This used to
|
540
|
+
cause "locks", memory leaks or even segmentation fault.
|
541
|
+
|
542
|
+
* Define views only if "views" key presented
|
543
|
+
|
544
|
+
* Require yajl as development dependency
|
545
|
+
|
546
|
+
* RCBC-76 Implement get with lock operation. Examples:
|
547
|
+
|
548
|
+
# Get and lock key using default timeout
|
549
|
+
c.get("foo", :lock => true)
|
550
|
+
|
551
|
+
# Determine lock timeout parameters
|
552
|
+
c.stats.values_at("ep_getl_default_timeout", "ep_getl_max_timeout")
|
553
|
+
#=> [{"127.0.0.2:11210"=>"15"}, {"127.0.0.1:11210"=>"30"}]
|
554
|
+
|
555
|
+
# Get and lock key using custom timeout
|
556
|
+
c.get("foo", :lock => 3)
|
557
|
+
|
558
|
+
* Update documentation
|
559
|
+
|
560
|
+
## 1.1.3 (2012-07-27)
|
561
|
+
|
562
|
+
5 files changed, 192 insertions(+), 101 deletions(-)
|
563
|
+
|
564
|
+
* RCBC-64 The Couchbase::Bucket class hasn't implemented the #dup
|
565
|
+
method. So it caused SEGFAULT. The patch is implementing correct
|
566
|
+
function, which copy the internals and initializes new connection.
|
567
|
+
|
568
|
+
* RCBC-59 The flags might be reset if caller will use
|
569
|
+
Couchbase::Bucket#cas operation. Here is IRB session demonstrating
|
570
|
+
the issue:
|
571
|
+
|
572
|
+
irb> Couchbase.bucket.set("foo", "bar", :flags => 0x100)
|
573
|
+
17982951084586893312
|
574
|
+
irb> Couchbase.bucket.cas("foo") { "baz" }
|
575
|
+
1712422461213442048
|
576
|
+
irb> Couchbase.bucket.get("foo", :extended => true)
|
577
|
+
["baz", 0, 1712422461213442048]
|
578
|
+
|
579
|
+
|
580
|
+
* RCBC-60 Make object_space GC protector per-bucket object. Previous
|
581
|
+
version provided not completely thread-safe bucket instance, because
|
582
|
+
it was sharing global hash for protecting objects, created in
|
583
|
+
extension, from garbage collecting.
|
584
|
+
|
585
|
+
## 1.1.2 (2012-06-05)
|
586
|
+
|
587
|
+
5 files changed, 9 insertions(+), 4 deletions(-)
|
588
|
+
|
589
|
+
* Upgrade libcouchbase dependency to 1.0.4. Version 1.0.4 includes
|
590
|
+
important stability fixes.
|
591
|
+
|
592
|
+
* Backport debugger patch. The gem used to require debugger as
|
593
|
+
development dependency. Unfortunately ruby-debug19 isn't supported
|
594
|
+
anymore for ruby 1.9.x. But there is new gem 'debugger'. This patch
|
595
|
+
replaces this dependency.
|
596
|
+
|
597
|
+
## 1.2.0.dp (2012-04-10)
|
598
|
+
|
599
|
+
19 files changed, 1606 insertions(+), 93 deletions(-)
|
600
|
+
|
601
|
+
* Properly handle hashes as Couchbase.connection_options. Fixed a bug
|
602
|
+
when 'Couchbase.connection_options' for "default" connection, when
|
603
|
+
there are several arguments to pass to the connect() function when
|
604
|
+
establishing thread local connection as below:
|
605
|
+
|
606
|
+
Couchbase.connection_options = {:port => 9000, :bucket => 'myapp'}
|
607
|
+
|
608
|
+
* Implement views. Couchbase Server Views are accessible using the
|
609
|
+
view APIs. Please refer to
|
610
|
+
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views.html
|
611
|
+
for getting started with views.
|
612
|
+
|
613
|
+
* Use verbose mode by default throwing exceptions on NOT_FOUND errors.
|
614
|
+
This means that quiet attribute is false now on new connections.
|
615
|
+
|
616
|
+
* Documentation fixes
|
617
|
+
|
618
|
+
## 1.1.1 (2012-03-19)
|
619
|
+
|
620
|
+
5 files changed, 83 insertions(+), 23 deletions(-)
|
621
|
+
|
622
|
+
* Flags are used differently in different clients for example between
|
623
|
+
Python and Ruby. This fix will force the format to a known value
|
624
|
+
irrespective of the flags.
|
625
|
+
|
626
|
+
* Calls between Ruby and C libraries for Couchbase which involved
|
627
|
+
default arguments had an associated arity of -1 which was not being
|
628
|
+
handled correctly. That is being handled correctly now.
|
629
|
+
|
630
|
+
## 1.1.0 (2012-03-07)
|
631
|
+
|
632
|
+
27 files changed, 2460 insertions(+), 849 deletions(-)
|
633
|
+
|
634
|
+
* With the usage of the URI parser from stdlib it is possible to
|
635
|
+
validate the bucket URI more strictly. Also, it is possible to
|
636
|
+
specify credentials in the URI like:
|
637
|
+
http://username:password@example.com:8091/pools/default/buckets/custom
|
638
|
+
|
639
|
+
* The "default" connection is available in thread local storage. This
|
640
|
+
mean that using the Couchbase.bucket method it is possible to get
|
641
|
+
access to current connection and there is no need to share
|
642
|
+
connections when running in multi-thread environment. Each thread
|
643
|
+
has its own connection reference.
|
644
|
+
|
645
|
+
* The direct dependency on libevent and libsasl has been removed. Now
|
646
|
+
the library doesn't require libevent headers installed.
|
647
|
+
|
648
|
+
* The disconnect and reconnect interfaces are implemented which
|
649
|
+
provide routines for explicit resource management. Connections were
|
650
|
+
freed only when the Garbage Collector found that the connection was
|
651
|
+
not being used. Now it's possible for the client to check if the
|
652
|
+
bucket was connected using 'connected?' or 'disconnect' it manually
|
653
|
+
or 'reconnect' using old settings.
|
654
|
+
|
655
|
+
* There were spurious timeout issues with a compound statement like
|
656
|
+
below. No timeout will occur unless there is a problem with the
|
657
|
+
connection.
|
658
|
+
|
659
|
+
connection.run do
|
660
|
+
connection.get("foo") {|ret| puts "got foo = #{ret.value}"}
|
661
|
+
sleep(5)
|
662
|
+
end
|
663
|
+
|
664
|
+
* It is not required to install libcouchbase or libvbucket on windows.
|
665
|
+
|
666
|
+
* It is possible to store nil as a value. It is possible to
|
667
|
+
distinguish a nil value from a missing key by looking at at the
|
668
|
+
value returned and the flags and CAS values as well.
|
669
|
+
|
670
|
+
* Based on the time out fix (CCBC-20), clients will be notified when
|
671
|
+
the connection was dropped or host isn't available.
|
672
|
+
|
673
|
+
## 1.0.0 (2012-01-23)
|
674
|
+
|
675
|
+
50 files changed, 4696 insertions(+), 2647 deletions(-)
|
676
|
+
|
677
|
+
* Port library to use libcouchbase instead of memcached gem.
|
678
|
+
Implemented following operations:
|
679
|
+
|
680
|
+
* get, []
|
681
|
+
* set, []=
|
682
|
+
* add
|
683
|
+
* replace
|
684
|
+
* append
|
685
|
+
* prepend
|
686
|
+
* compare-and-swap
|
687
|
+
* arithmetic (incr/decr)
|
688
|
+
* flush
|
689
|
+
* stats
|
690
|
+
* delete
|
691
|
+
* touch
|
692
|
+
|
693
|
+
* Introduce support for three data formats:
|
694
|
+
|
695
|
+
* document
|
696
|
+
* marshal
|
697
|
+
* plain
|
698
|
+
|
699
|
+
* Removed Views support
|
700
|
+
|
701
|
+
* Added benchmarks, couchbase vs. memcached vs. dalli
|
702
|
+
|
703
|
+
* Implement asynchronous protocol
|
704
|
+
|
705
|
+
## 0.9.8 (2011-12-16)
|
706
|
+
|
707
|
+
3 files changed, 8 insertions(+), 3 deletions(-)
|
708
|
+
|
709
|
+
* RCBC-10 Always specify credentials for non-default buckets. It was
|
710
|
+
impossible to store data in non-default buckets
|
711
|
+
|
712
|
+
## 0.9.7 (2011-10-05)
|
713
|
+
|
714
|
+
7 files changed, 31 insertions(+), 19 deletions(-)
|
715
|
+
|
716
|
+
* Fix design doc removing
|
717
|
+
|
718
|
+
* Fix 'set' method signature: add missing options argument
|
719
|
+
|
720
|
+
* Rename gem to 'couchbase' for easy of use. The github project still
|
721
|
+
is 'couchbase-ruby-client'
|
722
|
+
|
723
|
+
## 0.9.6 (2011-10-04)
|
724
|
+
|
725
|
+
13 files changed, 609 insertions(+), 99 deletions(-)
|
726
|
+
|
727
|
+
* Fix bug with decoding multiget result
|
728
|
+
|
729
|
+
* Allow create design documents from IO and String
|
730
|
+
|
731
|
+
* Rename 'json' format to 'document', and describe possible formats
|
732
|
+
|
733
|
+
* Allow to handle errors in view result stream
|
734
|
+
|
735
|
+
* Remove dependency on libyajl library: it bundled with yaji now
|
736
|
+
|
737
|
+
## 0.9.5 (2011-08-24)
|
738
|
+
|
739
|
+
4 files changed, 59 insertions(+), 28 deletions(-)
|
740
|
+
|
741
|
+
* Update README. Make it more human-friendly
|
742
|
+
|
743
|
+
* Removed dependency on will_paginate in development mode
|
744
|
+
|
745
|
+
## 0.9.4 (2011-08-01)
|
746
|
+
|
747
|
+
24 files changed, 1240 insertions(+), 78 deletions(-)
|
748
|
+
|
749
|
+
* Use streaming json parser to iterate over view results
|
750
|
+
|
751
|
+
* Update memcached gem dependency to v1.3
|
752
|
+
|
753
|
+
* Proxy TOUCH command to memcached client
|
754
|
+
|
755
|
+
* Fix minor bugs in RestClient and Document classes
|
756
|
+
|
757
|
+
* Disable CouchDB API for nodes without 'couchApiBase' key provided.
|
758
|
+
|
759
|
+
* Fix bug with unicode parsing in config listener
|
760
|
+
|
761
|
+
* 61f394e RCBC-5 Add Dave's test case: ensure memcached client
|
762
|
+
initialized. Fixes Timeout error on connecting to membase with
|
763
|
+
Couchbase.new on Ruby 1.8.7
|
764
|
+
|
765
|
+
## 0.9.3 (2011-07-29)
|
766
|
+
|
767
|
+
6 files changed, 167 insertions(+), 9 deletions(-)
|
768
|
+
|
769
|
+
* Use Latch (via Mutex and ConditionVariable) to wait until initial
|
770
|
+
setup will be finished.
|
771
|
+
|
772
|
+
* Update prefix for development views (from '$dev_' to 'dev_')
|
773
|
+
|
774
|
+
## 0.9.2 (2011-07-28)
|
775
|
+
|
776
|
+
5 files changed, 31 insertions(+), 20 deletions(-)
|
777
|
+
|
778
|
+
* Use zero TTL by default to store records forever
|
779
|
+
|
780
|
+
* Update documentation
|
781
|
+
|
782
|
+
* Wait until configuration is done
|
783
|
+
|
784
|
+
## 0.9.1 (2011-07-25)
|
785
|
+
|
786
|
+
3 files changed, 5 insertions(+), 2 deletions(-)
|
787
|
+
|
788
|
+
* Minor bugfix for RestClient initialization
|
789
|
+
|
790
|
+
## 0.9.0 (2011-07-25)
|
791
|
+
|
792
|
+
19 files changed, 1174 insertions(+)
|
793
|
+
|
794
|
+
* Initial public release. It supports most of the binary protocol
|
795
|
+
commands through memcached gem and also is able to listen to bucket
|
796
|
+
configuration and make View requests.
|