aerospike 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +14 -0
- data/lib/aerospike/command/command.rb +19 -18
- data/lib/aerospike/version.rb +1 -1
- metadata +24 -18
- checksums.yaml +0 -7
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,27 @@
|
|
1
|
+
## Augest 11 2015 (1.0.9)
|
2
|
+
|
3
|
+
Minor fix release.
|
4
|
+
|
5
|
+
* **Fixes**:
|
6
|
+
|
7
|
+
* Sends the original key value to the server for all relevant commands, including `operate` and `execute_udf`
|
8
|
+
|
1
9
|
## July 23 2015 (1.0.8)
|
2
10
|
|
3
11
|
Minor fix release.
|
4
12
|
|
13
|
+
* **Improvements**:
|
14
|
+
|
15
|
+
* Adds 'Filter.to_s'. Thanks to [Ángel M](https://github.com/Angelmmiguel)
|
16
|
+
|
5
17
|
* **Fixes**:
|
6
18
|
|
7
19
|
* Fixes an issue in write policy that would use an undefined variable if `:send_key` isn't `nil`.
|
8
20
|
|
9
21
|
* Fixes an issue in cluster.closed logic.
|
10
22
|
|
23
|
+
* Fixes an issue with including the `statement.rb` in the manifest. Thanks to [Ángel M](https://github.com/Angelmmiguel)
|
24
|
+
|
11
25
|
## May 15 2015 (1.0.7)
|
12
26
|
|
13
27
|
Minor fixes.
|
@@ -84,13 +84,7 @@ module Aerospike
|
|
84
84
|
# Writes the command for write operations
|
85
85
|
def set_write(policy, operation, key, bins)
|
86
86
|
begin_cmd
|
87
|
-
field_count = estimate_key_size(key)
|
88
|
-
|
89
|
-
if policy.send_key
|
90
|
-
# field header size + key size
|
91
|
-
@data_offset += key.user_key_as_value.estimate_size + FIELD_HEADER_SIZE
|
92
|
-
field_count += 1
|
93
|
-
end
|
87
|
+
field_count = estimate_key_size(key, policy)
|
94
88
|
|
95
89
|
bins.each do |bin|
|
96
90
|
estimate_operation_size_for_bin(bin)
|
@@ -99,11 +93,7 @@ module Aerospike
|
|
99
93
|
size_buffer
|
100
94
|
|
101
95
|
write_header_with_policy(policy, 0, INFO2_WRITE, field_count, bins.length)
|
102
|
-
write_key(key)
|
103
|
-
|
104
|
-
if policy.send_key
|
105
|
-
write_field_value(key.user_key_as_value, Aerospike::FieldType::KEY)
|
106
|
-
end
|
96
|
+
write_key(key, policy)
|
107
97
|
|
108
98
|
bins.each do |bin|
|
109
99
|
write_operation_for_bin(bin, operation)
|
@@ -199,7 +189,7 @@ module Aerospike
|
|
199
189
|
# Implements different command operations
|
200
190
|
def set_operate(policy, key, operations)
|
201
191
|
begin_cmd
|
202
|
-
field_count = estimate_key_size(key)
|
192
|
+
field_count = estimate_key_size(key, policy)
|
203
193
|
read_attr = 0
|
204
194
|
write_attr = 0
|
205
195
|
read_header = false
|
@@ -233,7 +223,7 @@ module Aerospike
|
|
233
223
|
else
|
234
224
|
write_header(policy, read_attr, write_attr, field_count, operations.length)
|
235
225
|
end
|
236
|
-
write_key(key)
|
226
|
+
write_key(key, policy)
|
237
227
|
|
238
228
|
operations.each do |operation|
|
239
229
|
write_operation_for_operation(operation)
|
@@ -246,14 +236,14 @@ module Aerospike
|
|
246
236
|
|
247
237
|
def set_udf(policy, key, package_name, function_name, args)
|
248
238
|
begin_cmd
|
249
|
-
field_count = estimate_key_size(key)
|
239
|
+
field_count = estimate_key_size(key, policy)
|
250
240
|
arg_bytes = args.to_bytes
|
251
241
|
|
252
242
|
field_count += estimate_udf_size(package_name, function_name, arg_bytes)
|
253
243
|
size_buffer
|
254
244
|
|
255
245
|
write_header(policy, 0, INFO2_WRITE, field_count, 0)
|
256
|
-
write_key(key)
|
246
|
+
write_key(key, policy)
|
257
247
|
write_field_string(package_name, Aerospike::FieldType::UDF_PACKAGE_NAME)
|
258
248
|
write_field_string(function_name, Aerospike::FieldType::UDF_FUNCTION)
|
259
249
|
write_field_bytes(arg_bytes, Aerospike::FieldType::UDF_ARGLIST)
|
@@ -488,7 +478,7 @@ module Aerospike
|
|
488
478
|
protected
|
489
479
|
|
490
480
|
|
491
|
-
def estimate_key_size(key)
|
481
|
+
def estimate_key_size(key, policy = nil)
|
492
482
|
field_count = 0
|
493
483
|
|
494
484
|
if key.namespace
|
@@ -504,6 +494,12 @@ module Aerospike
|
|
504
494
|
@data_offset += key.digest.bytesize + FIELD_HEADER_SIZE
|
505
495
|
field_count += 1
|
506
496
|
|
497
|
+
if policy && policy.respond_to?(:send_key) && policy.send_key == true
|
498
|
+
# field header size + key size
|
499
|
+
@data_offset += key.user_key_as_value.estimate_size + FIELD_HEADER_SIZE
|
500
|
+
field_count += 1
|
501
|
+
end
|
502
|
+
|
507
503
|
return field_count
|
508
504
|
end
|
509
505
|
|
@@ -616,7 +612,7 @@ module Aerospike
|
|
616
612
|
@data_offset = MSG_TOTAL_HEADER_SIZE
|
617
613
|
end
|
618
614
|
|
619
|
-
def write_key(key)
|
615
|
+
def write_key(key, policy = nil)
|
620
616
|
# Write key into buffer.
|
621
617
|
if key.namespace
|
622
618
|
write_field_string(key.namespace, Aerospike::FieldType::NAMESPACE)
|
@@ -627,6 +623,11 @@ module Aerospike
|
|
627
623
|
end
|
628
624
|
|
629
625
|
write_field_bytes(key.digest, Aerospike::FieldType::DIGEST_RIPE)
|
626
|
+
|
627
|
+
if policy && policy.respond_to?(:send_key) && policy.send_key == true
|
628
|
+
write_field_value(key.user_key_as_value, Aerospike::FieldType::KEY)
|
629
|
+
end
|
630
|
+
|
630
631
|
end
|
631
632
|
|
632
633
|
def write_operation_for_bin(bin, operation)
|
data/lib/aerospike/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aerospike
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Khosrow Afroozeh
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2015-
|
12
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: msgpack
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0.5'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0.5'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: bcrypt
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '3.1'
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '3.1'
|
41
46
|
description: Official Aerospike Client for ruby. Access your Aerospike cluster with
|
@@ -46,10 +51,6 @@ executables: []
|
|
46
51
|
extensions: []
|
47
52
|
extra_rdoc_files: []
|
48
53
|
files:
|
49
|
-
- CHANGELOG.md
|
50
|
-
- LICENSE
|
51
|
-
- README.md
|
52
|
-
- lib/aerospike.rb
|
53
54
|
- lib/aerospike/aerospike_exception.rb
|
54
55
|
- lib/aerospike/atomic/atomic.rb
|
55
56
|
- lib/aerospike/bin.rb
|
@@ -123,30 +124,35 @@ files:
|
|
123
124
|
- lib/aerospike/value/particle_type.rb
|
124
125
|
- lib/aerospike/value/value.rb
|
125
126
|
- lib/aerospike/version.rb
|
127
|
+
- lib/aerospike.rb
|
128
|
+
- CHANGELOG.md
|
129
|
+
- LICENSE
|
130
|
+
- README.md
|
126
131
|
homepage: http://www.github.com/aerospike/aerospike-client-ruby
|
127
132
|
licenses:
|
128
133
|
- Apache2.0
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
You can report issues on github.com/aerospike/aerospike-client-ruby
|
134
|
+
post_install_message: ! 'Thank you for using Aerospike!
|
135
|
+
|
136
|
+
You can report issues on github.com/aerospike/aerospike-client-ruby'
|
133
137
|
rdoc_options: []
|
134
138
|
require_paths:
|
135
139
|
- lib
|
136
140
|
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
137
142
|
requirements:
|
138
|
-
- -
|
143
|
+
- - ! '>='
|
139
144
|
- !ruby/object:Gem::Version
|
140
145
|
version: 1.9.3
|
141
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
142
148
|
requirements:
|
143
|
-
- -
|
149
|
+
- - ! '>='
|
144
150
|
- !ruby/object:Gem::Version
|
145
151
|
version: '0'
|
146
152
|
requirements: []
|
147
153
|
rubyforge_project:
|
148
|
-
rubygems_version:
|
154
|
+
rubygems_version: 1.8.23.2
|
149
155
|
signing_key:
|
150
|
-
specification_version:
|
156
|
+
specification_version: 3
|
151
157
|
summary: An Aerospike driver for Ruby.
|
152
158
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: f3f66f36fdd4739d6a3222cf5cd99f3190ae2c23
|
4
|
-
data.tar.gz: 89499baaaa2e0e6ece1d841cead28702904ced4f
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: da82349586ff80ef7f8efbf333def86d304dd549e929db3cf2d13229131c585390f5e9b282b1852b8f85af0fb2202ba2862e95a580753542cceeccfa74614edf
|
7
|
-
data.tar.gz: f0fe643fec93d4bc5cabeb48ae0e0a7ef8fc4090bc3ec8324181834c25298c3206f873d542a216368e6f04fe1eaba5357f842404d6d59d7ca92a9c6cd68ffb54
|