couchbase 1.2.1-x86-mingw32 → 1.2.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +50 -5
- data/RELEASE_NOTES.markdown +256 -145
- data/couchbase.gemspec +2 -4
- data/examples/chat-em/Gemfile +7 -0
- data/examples/chat-em/README.markdown +45 -0
- data/examples/chat-em/server.rb +82 -0
- data/ext/couchbase_ext/arguments.c +18 -17
- data/ext/couchbase_ext/arithmetic.c +17 -25
- data/ext/couchbase_ext/bucket.c +227 -32
- data/ext/couchbase_ext/context.c +64 -0
- data/ext/couchbase_ext/couchbase_ext.c +106 -14
- data/ext/couchbase_ext/couchbase_ext.h +81 -12
- data/ext/couchbase_ext/delete.c +18 -25
- data/ext/couchbase_ext/eventmachine_plugin.c +452 -0
- data/ext/couchbase_ext/extconf.rb +2 -0
- data/ext/couchbase_ext/get.c +18 -31
- data/ext/couchbase_ext/http.c +40 -31
- data/ext/couchbase_ext/multithread_plugin.c +38 -201
- data/ext/couchbase_ext/observe.c +17 -25
- data/ext/couchbase_ext/plugin_common.c +171 -0
- data/ext/couchbase_ext/result.c +18 -12
- data/ext/couchbase_ext/stats.c +17 -25
- data/ext/couchbase_ext/store.c +43 -47
- data/ext/couchbase_ext/touch.c +18 -25
- data/ext/couchbase_ext/unlock.c +18 -25
- data/ext/couchbase_ext/utils.c +23 -8
- data/ext/couchbase_ext/version.c +16 -24
- data/lib/couchbase.rb +1 -0
- data/lib/couchbase/bucket.rb +1 -1
- data/lib/couchbase/constants.rb +12 -0
- data/lib/couchbase/version.rb +1 -1
- data/lib/couchbase/view.rb +210 -60
- data/lib/couchbase/view_row.rb +103 -61
- data/tasks/compile.rake +1 -1
- data/test/test_async.rb +63 -0
- data/test/test_eventmachine.rb +70 -0
- metadata +24 -49
- data/tasks/doc.rake +0 -27
data/README.markdown
CHANGED
@@ -6,9 +6,6 @@ are related libraries available:
|
|
6
6
|
* [couchbase-model][6] the ActiveModel implementation, git repository:
|
7
7
|
[https://github.com/couchbase/couchbase-ruby-model][7]
|
8
8
|
|
9
|
-
* [em-couchbase][8] EventMachine friendly implementation of couchbase
|
10
|
-
client, git repository: [https://github.com/couchbase/couchbase-ruby-client-em][9]
|
11
|
-
|
12
9
|
## SUPPORT
|
13
10
|
|
14
11
|
If you found an issue, please file it in our [JIRA][1]. Also you are
|
@@ -520,6 +517,54 @@ Note that errors object in view results usually goes *after* the rows,
|
|
520
517
|
so you will likely receive a number of view results successfully before
|
521
518
|
the error is detected.
|
522
519
|
|
520
|
+
## Engines
|
521
|
+
|
522
|
+
As far as couchbase gem uses [libcouchbase][8] as the backend, you can
|
523
|
+
choose from several asynchronous IO options:
|
524
|
+
|
525
|
+
* `:default` this one is used by default and implemented as the part
|
526
|
+
of the ruby extensions (this mean you don't need any dependencies
|
527
|
+
apart from libcouchbase2-core and libcouchbase-dev to build and use
|
528
|
+
it). This engine honours ruby GVL, so when it comes to waiting for
|
529
|
+
IO operations from kernel it release the GVL allowing interpreter to
|
530
|
+
run your code. This technique isn't available on windows, but down't
|
531
|
+
worry `:default` engine still accessible and will pick up statically
|
532
|
+
linked on that platform `:libevent` engine.
|
533
|
+
|
534
|
+
* `:libev` and `:libevent`, these two engines require installed
|
535
|
+
libcouchbase2-libev and libcouchbase2-libevent packages
|
536
|
+
correspondingly. Currently they aren't so friendly to GVL but still
|
537
|
+
useful.
|
538
|
+
|
539
|
+
* `:eventmachine` engine. From version 1.2.2 it is possible to use
|
540
|
+
great [EventMachine][9] library as underlying IO backend and
|
541
|
+
integrate couchbase gem to your current asynchronous application.
|
542
|
+
This engine will be only accessible on the MRI ruby 1.9+. Checkout
|
543
|
+
simple example of usage:
|
544
|
+
|
545
|
+
require 'eventmachine'
|
546
|
+
require 'couchbase'
|
547
|
+
|
548
|
+
EM.epoll = true if EM.epoll?
|
549
|
+
EM.kqueue = true if EM.kqueue?
|
550
|
+
EM.run do
|
551
|
+
con = Couchbase.connect :engine => :eventmachine, :async => true
|
552
|
+
con.on_connect do |res|
|
553
|
+
puts "connected: #{res.inspect}"
|
554
|
+
if res.success?
|
555
|
+
con.set("emfoo", "bar") do |res|
|
556
|
+
puts "set: #{res.inspect}"
|
557
|
+
con.get("emfoo") do |res|
|
558
|
+
puts "get: #{res.inspect}"
|
559
|
+
EM.stop
|
560
|
+
end
|
561
|
+
end
|
562
|
+
else
|
563
|
+
EM.stop
|
564
|
+
end
|
565
|
+
end
|
566
|
+
end
|
567
|
+
|
523
568
|
[1]: http://couchbase.com/issues/browse/RCBC
|
524
569
|
[2]: http://freenode.net/irc_servers.shtml
|
525
570
|
[3]: http://www.couchbase.com/develop/c/current
|
@@ -527,6 +572,6 @@ the error is detected.
|
|
527
572
|
[5]: http://code.google.com/p/memcached/wiki/BinaryProtocolRevamped
|
528
573
|
[6]: https://rubygems.org/gems/couchbase-model
|
529
574
|
[7]: https://github.com/couchbase/couchbase-ruby-model
|
530
|
-
[8]:
|
531
|
-
[9]:
|
575
|
+
[8]: http://www.couchbase.com/develop/c/current
|
576
|
+
[9]: http://rubygems.org/gems/eventmachine
|
532
577
|
|
data/RELEASE_NOTES.markdown
CHANGED
@@ -3,13 +3,74 @@
|
|
3
3
|
This document is a list of user visible feature changes and important
|
4
4
|
bugfixes. Do not forget to update this doc in every important patch.
|
5
5
|
|
6
|
+
## 1.2.2 (2013-02-11)
|
7
|
+
|
8
|
+
* [minor] Bucket#design_docs will return a Hash with DesignDoc
|
9
|
+
instances as a values.
|
10
|
+
|
11
|
+
* [critical] RCBC-104 Data corruption on intensive store operations.
|
12
|
+
The issue could also lead to segfaults.
|
13
|
+
|
14
|
+
* [major] RCBC-118 Alias #total_rows as #total_entries on view result
|
15
|
+
set to match documentation.
|
16
|
+
|
17
|
+
* [minor] View#fetch_all - async method for fetching all records
|
18
|
+
|
19
|
+
conn.run do
|
20
|
+
doc.recent_posts.fetch_all do |posts|
|
21
|
+
do_something_with_all_posts(posts)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
* [major] Allow to use Bucket instance in completely asynchronous
|
26
|
+
environment like this, without blocking on connect:
|
27
|
+
|
28
|
+
conn = Couchbase.new(:async => true)
|
29
|
+
conn.run do
|
30
|
+
conn.on_connect do |res|
|
31
|
+
if res.success?
|
32
|
+
#
|
33
|
+
# schedule async requests
|
34
|
+
#
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
* [major] RCBC-27 EventMachine plugin to integrate with EventMachine
|
40
|
+
library. Note that the plugin is experimental at this stage.
|
41
|
+
Example:
|
42
|
+
|
43
|
+
require 'eventmachine'
|
44
|
+
require 'couchbase'
|
45
|
+
|
46
|
+
EM.epoll = true if EM.epoll?
|
47
|
+
EM.kqueue = true if EM.kqueue?
|
48
|
+
EM.run do
|
49
|
+
con = Couchbase.connect(:engine => :eventmachine, :async => true)
|
50
|
+
con.on_connect do |res|
|
51
|
+
puts "connected: #{res.inspect}"
|
52
|
+
if res.success?
|
53
|
+
con.set("emfoo", "bar") do |res|
|
54
|
+
puts "set: #{res.inspect}"
|
55
|
+
con.get("emfoo") do |res|
|
56
|
+
puts "get: #{res.inspect}"
|
57
|
+
EM.stop
|
58
|
+
end
|
59
|
+
end
|
60
|
+
else
|
61
|
+
EM.stop
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
|
6
67
|
## 1.2.1 (2012-12-28)
|
7
68
|
|
8
|
-
* [major] RCBC-101 Persistence constraints
|
9
|
-
methods, so they
|
69
|
+
* [major] RCBC-101 Persistence constraints wasn't passed to mutation
|
70
|
+
methods, so they haven't been applied properly.
|
10
71
|
|
11
72
|
* [major] RCBC-102 Inconsistent return values in case of storage
|
12
|
-
functions with persistence constraints. It always
|
73
|
+
functions with persistence constraints. It always return a Hash like
|
13
74
|
in case of multi-set, even if there is only one document is being
|
14
75
|
set.
|
15
76
|
|
@@ -20,127 +81,145 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
20
81
|
|
21
82
|
30 files changed, 2079 insertions(+), 662 deletions(-)
|
22
83
|
|
23
|
-
*
|
84
|
+
* Specialized io plugin for releasing Ruby GVL (thanks to
|
24
85
|
Sokolov Yura aka funny_falcon).
|
25
86
|
|
26
|
-
* Ruby 1.9.x uses
|
87
|
+
* Ruby 1.9.x uses global lock for ensuring integrity, and blocking
|
27
88
|
calls should be called inside rb_thread_blocking_region to allow
|
28
|
-
other threads to be
|
89
|
+
other threads to be runned.
|
29
90
|
|
30
|
-
* Ruby 1.8.7
|
91
|
+
* Ruby 1.8.7 have only green threads, so that rb_thread_schedule
|
31
92
|
should be called manually.
|
32
93
|
|
33
|
-
* RCBC-42 Catch exceptions from ruby callbacks
|
94
|
+
* RCBC-42 Catch exceptions from ruby callbacks
|
34
95
|
|
35
|
-
* RCBC-99 read out the StringIO contents in json gem monkey patch
|
96
|
+
* RCBC-99 read out the StringIO contents in json gem monkey patch
|
36
97
|
|
37
|
-
* Use marshal serializer by default for session store
|
98
|
+
* Use marshal serializer by default for session store
|
38
99
|
|
39
|
-
* Remove debugger development dependency
|
100
|
+
* Remove debugger development dependency
|
40
101
|
|
41
|
-
* Fix memory leaks and performance improvements
|
102
|
+
* Fix memory leaks and performance improvements
|
42
103
|
|
43
104
|
## 1.2.0.z.beta5 (2012-11-29)
|
44
105
|
|
45
106
|
25 files changed, 1419 insertions(+), 1230 deletions(-)
|
46
107
|
|
47
|
-
* RCBC-95 Use response body to clarify Couchbase::Error::HTTP
|
108
|
+
* RCBC-95 Use response body to clarify Couchbase::Error::HTTP
|
48
109
|
|
49
|
-
* Fix memory leaks: in async mode context wasn't freed
|
110
|
+
* Fix memory leaks: in async mode context wasn't freed
|
50
111
|
|
51
|
-
* Allow
|
52
|
-
|
112
|
+
* Allow to setup default initial value for INCR/DECR on per connection
|
113
|
+
level.
|
53
114
|
|
54
|
-
* Make error message about libcouchbase dependency more verbose
|
115
|
+
* Make error message about libcouchbase dependency more verbose
|
55
116
|
|
56
117
|
## 1.2.0.z.beta4 (2012-11-21)
|
57
118
|
|
58
119
|
27 files changed, 311 insertions(+), 123 deletions(-)
|
59
120
|
|
60
|
-
* Increase default connection timeout for Views up to 75 seconds
|
121
|
+
* Increase default connection timeout for Views up to 75 seconds
|
61
122
|
|
62
|
-
* RCBC-94 Reset global exception after usage
|
123
|
+
* RCBC-94 Reset global exception after usage
|
63
124
|
|
64
125
|
* RCBC-89 Do not expose docs embedded in HTTP response. Use binary
|
65
126
|
protocol for it.
|
66
127
|
|
67
128
|
* Remove all_docs mentions. It isn't recommended to use it because of
|
68
|
-
performance
|
129
|
+
performance issues
|
69
130
|
|
70
131
|
* Protect against non string values in :plain mode. Will raise error
|
71
132
|
if the value given isn't a string.
|
72
133
|
|
73
|
-
* RCBC-90 Update documentation about session store
|
134
|
+
* RCBC-90 Update documentation about session store
|
74
135
|
|
75
|
-
* Make rack session store adapter quiet
|
136
|
+
* Make rack session store adapter quiet
|
76
137
|
|
77
|
-
* Update to recent libcouchbase API
|
138
|
+
* Update to recent libcouchbase API
|
78
139
|
|
79
|
-
* Adjust version check for MultiJson monkeypatch (8098da1)
|
140
|
+
* Adjust version check for MultiJson monkeypatch (8098da1)
|
80
141
|
|
81
|
-
* Do not hide ValueFormat reason.
|
142
|
+
* Do not hide ValueFormat reason. It is accessible using
|
143
|
+
Couchbase::Error::Value#inner_exception.
|
82
144
|
|
83
145
|
## 1.2.0.z.beta3 (2012-10-16)
|
84
146
|
|
85
147
|
18 files changed, 241 insertions(+), 57 deletions(-)
|
86
148
|
|
87
|
-
* RCBC-52 Implement bucket create/delete operations.
|
149
|
+
* RCBC-52 Implement bucket create/delete operations. Examples:
|
88
150
|
|
89
|
-
|
151
|
+
conn = Couchbase::Cluster.new(:hostname => "localhost",
|
152
|
+
:username => "Administrator", :password => "secret")
|
153
|
+
conn.create_bucket("my_protected_bucket",
|
154
|
+
:ram_quota => 500, # megabytes
|
155
|
+
:sasl_password => "s3cr3tBuck3t")
|
90
156
|
|
91
|
-
*
|
157
|
+
* Propagate status code for HTTP responses
|
92
158
|
|
93
|
-
*
|
159
|
+
* RCBC-87 Fix build error on Mac OS X
|
94
160
|
|
95
|
-
*
|
161
|
+
* Use global scope to find Error classes (thanks to @wr0ngway)
|
96
162
|
|
97
|
-
*
|
163
|
+
* Fix memory leaks
|
164
|
+
|
165
|
+
* Update to recent libcouchbase API
|
98
166
|
|
99
167
|
## 1.2.0.z.beta2 (2012-09-21)
|
100
168
|
|
101
169
|
3 files changed, 6 insertions(+), 2 deletions(-)
|
102
170
|
|
103
|
-
* RCBC-82 Not all rubies are fat on
|
171
|
+
* RCBC-82 Not all rubies are fat on Mac OS X. Fixes build there
|
104
172
|
|
105
173
|
## 1.2.0.z.beta (2012-09-18)
|
106
174
|
|
107
175
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
108
176
|
|
109
|
-
* Fix version ordering by using ".z" prefix before .beta.
|
177
|
+
* Fix version ordering by using ".z" prefix before .beta. The problem
|
178
|
+
is that DP (Developer Preview) should have lower precedence than
|
179
|
+
Beta, but alphabetially ".beta" orders before ".dp". This is why
|
180
|
+
further Beta versions have ".z".
|
110
181
|
|
111
182
|
## 1.2.0.beta (2012-09-18)
|
112
183
|
|
113
184
|
51 files changed, 9301 insertions(+), 3364 deletions(-)
|
114
185
|
|
115
186
|
* RCBC-81 Protect against NoMethodError in extconf.rb. Fixes
|
116
|
-
gem installation
|
187
|
+
gem installation
|
188
|
+
|
189
|
+
* RCBC-79 Use RESTful flush
|
190
|
+
|
191
|
+
* Various build fixes
|
117
192
|
|
118
|
-
*
|
193
|
+
* Add attribute reader for Error::Base status code
|
119
194
|
|
120
|
-
*
|
195
|
+
* CCBC-98 Expose client temporary failure error
|
121
196
|
|
122
|
-
*
|
197
|
+
* RCBC-28 Implement Bucket#unlock
|
123
198
|
|
124
|
-
|
199
|
+
# Unlock the single key
|
200
|
+
val, _, cas = c.get("foo", :lock => true, :extended => true)
|
201
|
+
c.unlock("foo", :cas => cas)
|
125
202
|
|
126
|
-
|
203
|
+
# Unlock several keys
|
204
|
+
c.unlock("foo" => cas1, :bar => cas2)
|
205
|
+
#=> {"foo" => true, "bar" => true}
|
127
206
|
|
128
|
-
* Fix CAS conversion for Bucket#delete method for 32-bit systems
|
207
|
+
* Fix CAS conversion for Bucket#delete method for 32-bit systems
|
129
208
|
|
130
209
|
## 1.1.5 (2012-09-17)
|
131
210
|
|
132
211
|
3 files changed, 9 insertions(+), 5 deletions(-)
|
133
212
|
|
134
|
-
* RCBC-81 Fixed installing issue on
|
213
|
+
* RCBC-81 Fixed installing issue on Mac OS X.
|
135
214
|
|
136
215
|
## 1.1.4 (2012-08-30)
|
137
216
|
|
138
217
|
5 files changed, 64 insertions(+), 30 deletions(-)
|
139
218
|
|
140
|
-
* RCBC-37 Allow
|
141
|
-
iterate addresses until
|
219
|
+
* RCBC-37 Allow to pass intial list of nodes which will allow to
|
220
|
+
iterate addresses until alive node will be found.
|
142
221
|
|
143
|
-
|
222
|
+
Couchbase.connect(:node_list => ['example.com:8091', 'example.org:8091', 'example.net'])
|
144
223
|
|
145
224
|
* RCBC-70 Fixed UTF-8 in the keys. Original discussion
|
146
225
|
https://groups.google.com/d/topic/couchbase/bya0lSf9uGE/discussion
|
@@ -152,23 +231,37 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
152
231
|
* RCBC-47 Allow to skip username for protected buckets. The will use
|
153
232
|
bucket name for credentials.
|
154
233
|
|
155
|
-
* Expose
|
234
|
+
* Expose number of replicas to the user
|
235
|
+
|
236
|
+
* RCBC-6 Implement Bucket#observe command to query durable state.
|
237
|
+
Examples:
|
238
|
+
|
239
|
+
# Query state of single key
|
240
|
+
c.observe("foo")
|
241
|
+
#=> [#<Couchbase::Result:0x00000001650df0 ...>, ...]
|
242
|
+
|
243
|
+
# Query state of multiple keys
|
244
|
+
keys = ["foo", "bar"]
|
245
|
+
stats = c.observe(keys)
|
246
|
+
stats.size #=> 2
|
247
|
+
stats["foo"] #=> [#<Couchbase::Result:0x00000001650df0 ...>, ...]
|
156
248
|
|
157
|
-
* RCBC-
|
249
|
+
* RCBC-49 Storage functions with durability requirements
|
158
250
|
|
159
|
-
|
251
|
+
# Ensure that the key will be persisted at least on the one node
|
252
|
+
c.set("foo", "bar", :observe => {:persisted => 1})
|
160
253
|
|
161
|
-
* RCBC-50 Allow to read keys from replica
|
254
|
+
* RCBC-50 Allow to read keys from replica
|
162
255
|
|
163
|
-
* RCBC-57 Expose timers API from libcouchbase
|
256
|
+
* RCBC-57 Expose timers API from libcouchbase
|
164
257
|
|
165
|
-
* RCBC-59 Replicate flags in Bucket#cas operation
|
258
|
+
* RCBC-59 Replicate flags in Bucket#cas operation
|
166
259
|
|
167
260
|
* Apply timeout value before connection. Currently libcouchbase shares
|
168
261
|
timeouts for connection and IO operations. This patch allows to
|
169
|
-
setup
|
262
|
+
setup timeout on the instantiating the connection.
|
170
263
|
|
171
|
-
* RCBC-39 Allow to specify delta for incr/decr in options
|
264
|
+
* RCBC-39 Allow to specify delta for incr/decr in options
|
172
265
|
|
173
266
|
* RCBC-40 Fix Bucket#cas operation behaviour in async mode. The
|
174
267
|
callback of the Bucket#cas method is triggered only once, when it
|
@@ -176,27 +269,27 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
176
269
|
the next store operation was successful. Example, append JSON
|
177
270
|
encoded value asynchronously:
|
178
271
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
272
|
+
c.default_format = :document
|
273
|
+
c.set("foo", {"bar" => 1})
|
274
|
+
c.run do
|
275
|
+
c.cas("foo") do |val|
|
276
|
+
case val.operation
|
277
|
+
when :get
|
278
|
+
val["baz"] = 2
|
279
|
+
val
|
280
|
+
when :set
|
281
|
+
# verify all is ok
|
282
|
+
puts "error: #{ret.error.inspect}" unless ret.success?
|
283
|
+
end
|
284
|
+
end
|
190
285
|
end
|
191
|
-
|
192
|
-
end
|
193
|
-
c.get("foo") #=> {"bar" => 1, "baz" => 2}
|
286
|
+
c.get("foo") #=> {"bar" => 1, "baz" => 2}
|
194
287
|
|
195
|
-
* RCBC-43 More docs and examples on views
|
288
|
+
* RCBC-43 More docs and examples on views
|
196
289
|
|
197
|
-
* RCBC-37 Bootstrapping using multiple nodes
|
290
|
+
* RCBC-37 Bootstrapping using multiple nodes
|
198
291
|
|
199
|
-
|
292
|
+
Couchbase.connect(:node_list => ['example.com:8091', 'example.org:8091', 'example.net'])
|
200
293
|
|
201
294
|
* Inherit StandardError instead RuntimeError for errors
|
202
295
|
|
@@ -204,54 +297,55 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
204
297
|
|
205
298
|
12 files changed, 939 insertions(+), 20 deletions(-)
|
206
299
|
|
207
|
-
* Integrate with Rack and Rails session store
|
300
|
+
* Integrate with Rack and Rails session store
|
208
301
|
|
209
|
-
|
210
|
-
|
211
|
-
|
302
|
+
# rack
|
303
|
+
require 'rack/session/couchbase'
|
304
|
+
use Rack::Session::Couchbase
|
212
305
|
|
213
|
-
|
214
|
-
|
215
|
-
|
306
|
+
# rails
|
307
|
+
require 'action_dispatch/middleware/session/couchbase_store'
|
308
|
+
AppName::Application.config.session_store :couchbase_store
|
216
309
|
|
217
|
-
* Implement cache store adapter for Rails
|
310
|
+
* Implement cache store adapter for Rails
|
218
311
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
312
|
+
cache_options = {
|
313
|
+
:bucket => 'protected',
|
314
|
+
:username => 'protected',
|
315
|
+
:password => 'secret',
|
316
|
+
:expires_in => 30.seconds
|
317
|
+
}
|
318
|
+
config.cache_store = :couchbase_store, cache_options
|
226
319
|
|
227
|
-
* Implement key prefix (simple namespacing)
|
320
|
+
* Implement key prefix (simple namespacing)
|
228
321
|
|
229
|
-
|
322
|
+
Couchbase.connect(:key_prefix => "prefix:")
|
230
323
|
|
231
|
-
* Allow to force assembling result Hash for multi-get
|
324
|
+
* Allow to force assembling result Hash for multi-get
|
232
325
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
326
|
+
connection.get("foo", "bar")
|
327
|
+
#=> [1, 2]
|
328
|
+
connection.get("foo", "bar", :assemble_hash => true)
|
329
|
+
#=> {"foo" => 1, "bar" => 2}
|
237
330
|
|
238
331
|
## 1.2.0.dp4 (2012-06-07)
|
239
332
|
|
240
333
|
4 files changed, 34 insertions(+), 19 deletions(-)
|
241
334
|
|
242
|
-
* Update replace documentation: it accepts :cas option
|
335
|
+
* Update Bucket#replace documentation: it accepts :cas option
|
243
336
|
|
244
|
-
* RCBC-36 Fix segfault.
|
337
|
+
* RCBC-36 Fix segfault. Occasional segfault when accessing the
|
245
338
|
results of a View. https://gist.github.com/2883925
|
246
339
|
|
247
340
|
## 1.2.0.dp3 (2012-06-06)
|
248
341
|
|
249
342
|
4 files changed, 22 insertions(+), 4 deletions(-)
|
250
343
|
|
251
|
-
* Fix for multi_json < 1.3.3
|
344
|
+
* Fix for multi_json < 1.3.3
|
252
345
|
|
253
|
-
* Break out from event loop for non-chunked responses
|
254
|
-
|
346
|
+
* Break out from event loop for non-chunked responses. View results
|
347
|
+
are chunked by default, so there no problems, but other requests
|
348
|
+
like Bucket#save_design_doc() were "locking" awaiting forever.
|
255
349
|
|
256
350
|
## 1.2.0.dp2 (2012-06-06)
|
257
351
|
|
@@ -263,15 +357,15 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
263
357
|
I have n items to return. If there happens to be only one item it
|
264
358
|
will be treated differently than if there happens to be 2 items.
|
265
359
|
|
266
|
-
|
267
|
-
|
268
|
-
|
360
|
+
get(["foo"]) #=> ["bar"]
|
361
|
+
get("foo") #=> "bar"
|
362
|
+
get(["x"], :extended => true) #=> {"x"=>["xval", 0, 18336939621176836096]}
|
269
363
|
|
270
|
-
* Use monotonic high resolution clock
|
364
|
+
* Use monotonic high resolution clock
|
271
365
|
|
272
|
-
* Implement threshold for outgoing commands
|
366
|
+
* Implement threshold for outgoing commands
|
273
367
|
|
274
|
-
* Allow event loop
|
368
|
+
* Allow to stop event loop from ruby
|
275
369
|
|
276
370
|
* RCBC-35 Fix the View parameters escaping. More info at
|
277
371
|
https://gist.github.com/2775050
|
@@ -281,17 +375,28 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
281
375
|
various gems. The most compatible way to use yajl is to call
|
282
376
|
Yajl::Parser and Yajl::Encoder directly.
|
283
377
|
|
284
|
-
* Allow block and wait for part of the
|
378
|
+
* Allow to block and wait for part of the requests
|
285
379
|
|
286
|
-
*
|
380
|
+
* Fixed view iterator. It doesn't lock event loop anymore This used to
|
381
|
+
cause "locks", memory leaks or even segmentation fault.
|
287
382
|
|
288
|
-
* Define views only if "views" key presented
|
383
|
+
* Define views only if "views" key presented
|
289
384
|
|
290
|
-
* Require yajl as development dependency
|
385
|
+
* Require yajl as development dependency
|
291
386
|
|
292
|
-
* Implement get with lock operation.
|
387
|
+
* RCBC-76 Implement get with lock operation. Examples:
|
293
388
|
|
294
|
-
|
389
|
+
# Get and lock key using default timeout
|
390
|
+
c.get("foo", :lock => true)
|
391
|
+
|
392
|
+
# Determine lock timeout parameters
|
393
|
+
c.stats.values_at("ep_getl_default_timeout", "ep_getl_max_timeout")
|
394
|
+
#=> [{"127.0.0.2:11210"=>"15"}, {"127.0.0.1:11210"=>"30"}]
|
395
|
+
|
396
|
+
# Get and lock key using custom timeout
|
397
|
+
c.get("foo", :lock => 3)
|
398
|
+
|
399
|
+
* Update documentation
|
295
400
|
|
296
401
|
## 1.1.3 (2012-07-27)
|
297
402
|
|
@@ -302,15 +407,15 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
302
407
|
function, which copy the internals and initializes new connection.
|
303
408
|
|
304
409
|
* RCBC-59 The flags might be reset if caller will use
|
305
|
-
Couchbase::Bucket#cas operation. Here is IRB session
|
410
|
+
Couchbase::Bucket#cas operation. Here is IRB session demonstrating
|
306
411
|
the issue:
|
307
412
|
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
413
|
+
irb> Couchbase.bucket.set("foo", "bar", :flags => 0x100)
|
414
|
+
17982951084586893312
|
415
|
+
irb> Couchbase.bucket.cas("foo") { "baz" }
|
416
|
+
1712422461213442048
|
417
|
+
irb> Couchbase.bucket.get("foo", :extended => true)
|
418
|
+
["baz", 0, 1712422461213442048]
|
314
419
|
|
315
420
|
|
316
421
|
* RCBC-60 Make object_space GC protector per-bucket object. Previous
|
@@ -334,9 +439,17 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
334
439
|
|
335
440
|
19 files changed, 1606 insertions(+), 93 deletions(-)
|
336
441
|
|
337
|
-
* Properly handle hashes as Couchbase.connection_options
|
442
|
+
* Properly handle hashes as Couchbase.connection_options. Fixed a bug
|
443
|
+
when 'Couchbase.connection_options' for "default" connection, when
|
444
|
+
there are several arguments to pass to the connect() function when
|
445
|
+
establishing thread local connection as below:
|
338
446
|
|
339
|
-
|
447
|
+
Couchbase.connection_options = {:port => 9000, :bucket => 'myapp'}
|
448
|
+
|
449
|
+
* Implement views. Couchbase Server Views are accessible using the
|
450
|
+
view APIs. Please refer to
|
451
|
+
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views.html
|
452
|
+
for getting started with views.
|
340
453
|
|
341
454
|
* Use verbose mode by default throwing exceptions on NOT_FOUND errors.
|
342
455
|
This means that quiet attribute is false now on new connections.
|
@@ -370,8 +483,8 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
370
483
|
connections when running in multi-thread environment. Each thread
|
371
484
|
has its own connection reference.
|
372
485
|
|
373
|
-
* The direct dependency on libevent and
|
374
|
-
library doesn't require libevent headers installed.
|
486
|
+
* The direct dependency on libevent and libsasl has been removed. Now
|
487
|
+
the library doesn't require libevent headers installed.
|
375
488
|
|
376
489
|
* The disconnect and reconnect interfaces are implemented which
|
377
490
|
provide routines for explicit resource management. Connections were
|
@@ -384,10 +497,10 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
384
497
|
below. No timeout will occur unless there is a problem with the
|
385
498
|
connection.
|
386
499
|
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
500
|
+
connection.run do
|
501
|
+
connection.get("foo") {|ret| puts "got foo = #{ret.value}"}
|
502
|
+
sleep(5)
|
503
|
+
end
|
391
504
|
|
392
505
|
* It is not required to install libcouchbase or libvbucket on windows.
|
393
506
|
|
@@ -398,7 +511,7 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
398
511
|
* Based on the time out fix (CCBC-20), clients will be notified when
|
399
512
|
the connection was dropped or host isn't available.
|
400
513
|
|
401
|
-
## 1.0.0 (2012-
|
514
|
+
## 1.0.0 (2012-01-23)
|
402
515
|
|
403
516
|
50 files changed, 4696 insertions(+), 2647 deletions(-)
|
404
517
|
|
@@ -424,28 +537,26 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
424
537
|
* marshal
|
425
538
|
* plain
|
426
539
|
|
427
|
-
* Removed Views support
|
540
|
+
* Removed Views support
|
428
541
|
|
429
542
|
* Added benchmarks, couchbase vs. memcached vs. dalli
|
430
543
|
|
431
|
-
* Implement asynchronous protocol
|
432
|
-
|
433
|
-
* e36c2e7 Implement basic commands.
|
544
|
+
* Implement asynchronous protocol
|
434
545
|
|
435
546
|
## 0.9.8 (2011-12-16)
|
436
547
|
|
437
548
|
3 files changed, 8 insertions(+), 3 deletions(-)
|
438
549
|
|
439
550
|
* RCBC-10 Always specify credentials for non-default buckets. It was
|
440
|
-
impossible to store data in non-default buckets
|
551
|
+
impossible to store data in non-default buckets
|
441
552
|
|
442
553
|
## 0.9.7 (2011-10-05)
|
443
554
|
|
444
555
|
7 files changed, 31 insertions(+), 19 deletions(-)
|
445
556
|
|
446
|
-
* Fix design doc
|
557
|
+
* Fix design doc removing
|
447
558
|
|
448
|
-
* Fix 'set' method signature: add missing options argument
|
559
|
+
* Fix 'set' method signature: add missing options argument
|
449
560
|
|
450
561
|
* Rename gem to 'couchbase' for easy of use. The github project still
|
451
562
|
is 'couchbase-ruby-client'
|
@@ -468,29 +579,29 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
468
579
|
|
469
580
|
4 files changed, 59 insertions(+), 28 deletions(-)
|
470
581
|
|
471
|
-
* Update README. Make it more human-friendly
|
582
|
+
* Update README. Make it more human-friendly
|
472
583
|
|
473
|
-
* Removed
|
584
|
+
* Removed dependency on will_paginate in development mode
|
474
585
|
|
475
586
|
## 0.9.4 (2011-08-01)
|
476
587
|
|
477
588
|
24 files changed, 1240 insertions(+), 78 deletions(-)
|
478
589
|
|
479
|
-
* Use streaming json parser to iterate over view results
|
590
|
+
* Use streaming json parser to iterate over view results
|
480
591
|
|
481
|
-
* Update memcached gem dependency to v1.3
|
592
|
+
* Update memcached gem dependency to v1.3
|
482
593
|
|
483
|
-
* Proxy TOUCH command to memcached client
|
594
|
+
* Proxy TOUCH command to memcached client
|
484
595
|
|
485
|
-
* Fix minor bugs in RestClient and Document classes
|
596
|
+
* Fix minor bugs in RestClient and Document classes
|
486
597
|
|
487
598
|
* Disable CouchDB API for nodes without 'couchApiBase' key provided.
|
488
599
|
|
489
|
-
* Fix bug with unicode parsing in config listener
|
600
|
+
* Fix bug with unicode parsing in config listener
|
490
601
|
|
491
602
|
* 61f394e RCBC-5 Add Dave's test case: ensure memcached client
|
492
603
|
initialized. Fixes Timeout error on connecting to membase with
|
493
|
-
Couchbase.new on Ruby 1.8.7
|
604
|
+
Couchbase.new on Ruby 1.8.7
|
494
605
|
|
495
606
|
## 0.9.3 (2011-07-29)
|
496
607
|
|
@@ -499,28 +610,28 @@ bugfixes. Do not forget to update this doc in every important patch.
|
|
499
610
|
* Use Latch (via Mutex and ConditionVariable) to wait until initial
|
500
611
|
setup will be finished.
|
501
612
|
|
502
|
-
* Update prefix for development views (from '$dev_' to 'dev_')
|
613
|
+
* Update prefix for development views (from '$dev_' to 'dev_')
|
503
614
|
|
504
615
|
## 0.9.2 (2011-07-28)
|
505
616
|
|
506
617
|
5 files changed, 31 insertions(+), 20 deletions(-)
|
507
618
|
|
508
|
-
* Use zero TTL by default to store records forever
|
619
|
+
* Use zero TTL by default to store records forever
|
509
620
|
|
510
|
-
* Update documentation
|
621
|
+
* Update documentation
|
511
622
|
|
512
|
-
* Wait until configuration is done
|
623
|
+
* Wait until configuration is done
|
513
624
|
|
514
625
|
## 0.9.1 (2011-07-25)
|
515
626
|
|
516
627
|
3 files changed, 5 insertions(+), 2 deletions(-)
|
517
628
|
|
518
|
-
* Minor bugfix for RestClient initialization
|
629
|
+
* Minor bugfix for RestClient initialization
|
519
630
|
|
520
631
|
## 0.9.0 (2011-07-25)
|
521
632
|
|
522
633
|
19 files changed, 1174 insertions(+)
|
523
634
|
|
524
|
-
* Initial public release. It
|
635
|
+
* Initial public release. It supports most of the binary protocol
|
525
636
|
commands through memcached gem and also is able to listen to bucket
|
526
637
|
configuration and make View requests.
|