tarantool 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d45dfdd4a7f89cdee76444521a0bf9cf82a7da18
4
+ data.tar.gz: 3f2c6296ec71a7abc6cec77a81d5bab886504122
5
+ SHA512:
6
+ metadata.gz: 9542b6c58e584561c1ebeb7125e7edbbd2b83fca3ef17bfc0ae7cb91c1d8c47bf290ada319ce1a9c4d1a89fddca31eda100aa75827ad89aef21f6d9b0a930d4c
7
+ data.tar.gz: 3c9b4b6e282c973505ea8f640c8db589a5e63209fe1505f2b3f57b96182e2f37855d99a666def9472c4a61b8ce7bcaee2e0fbc3f23a29a6b0d281f060826d71c
@@ -87,9 +87,9 @@ slice_ber(const uint8_t **str, size_t *len)
87
87
  uint8_t digit = **str;
88
88
  res = (res << 7) | (digit & 127);
89
89
  (*str)++; (*len)--;
90
- if (digit < 128) return res;
90
+ if ((digit & 128) == 0) return res;
91
91
  }
92
- rb_raise(rb_eValueError, "Response too short");
92
+ rb_raise(rb_eValueError, "Response too short for ber");
93
93
  return 0;
94
94
  }
95
95
 
@@ -131,8 +131,8 @@ unpack_tuples(VALUE self, VALUE data, VALUE fields, VALUE _tail, VALUE tuples_af
131
131
  if (len < 8) {
132
132
  rb_raise(rb_eValueError, "Response too short");
133
133
  }
134
- end = str + 8 + *(uint32_t*)str;
135
- tuplen = *(uint32_t*)(str+4);
134
+ end = str + 8 + get_uint32(str);
135
+ tuplen = get_uint32(str+4);
136
136
  tuple = rb_ary_new2(tuplen);
137
137
  str += 8;
138
138
  len -= 8;
@@ -73,6 +73,7 @@ module Tarantool
73
73
  end
74
74
  end
75
75
 
76
+ X02 = '%02x'.freeze
76
77
  def unpack_tuples(data)
77
78
  tuples_affected = ::BinUtils.slice_int32_le!(data)
78
79
  fields = fields()
@@ -81,7 +82,13 @@ module Tarantool
81
82
  else
82
83
  tail = 1
83
84
  end
84
- _unpack_tuples(data, fields, tail, tuples_affected)
85
+ orig_data = data.dup
86
+ begin
87
+ _unpack_tuples(data, fields, tail, tuples_affected)
88
+ rescue ValueError => e
89
+ $stderr.puts "Value Error: tuples=#{tuples_affected}, data='#{orig_data.each_byte.map{|b| format(X02, b)}.join(' ')}'"
90
+ raise e
91
+ end
85
92
  end
86
93
 
87
94
  def _unpack_tuples(data, fields, tail, tuples_affected)
@@ -1,4 +1,4 @@
1
1
  module Tarantool
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  RECORD_VERSION = "0.4.3"
4
4
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tarantool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
5
- prerelease:
4
+ version: 0.5.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Andrew Rudenko
@@ -10,71 +9,63 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2014-04-22 00:00:00.000000000 Z
12
+ date: 2014-05-13 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- requirement: !ruby/object:Gem::Requirement
15
+ prerelease: false
16
+ name: iproto
17
+ version_requirements: !ruby/object:Gem::Requirement
17
18
  requirements:
18
- - - ! '>='
19
+ - - '>='
19
20
  - !ruby/object:Gem::Version
20
21
  version: 0.3.8
21
- none: false
22
- version_requirements: !ruby/object:Gem::Requirement
22
+ requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.3.8
27
- none: false
28
- prerelease: false
29
- name: iproto
30
27
  type: :runtime
31
28
  - !ruby/object:Gem::Dependency
32
- requirement: !ruby/object:Gem::Requirement
29
+ prerelease: false
30
+ name: murmurhash3
31
+ version_requirements: !ruby/object:Gem::Requirement
33
32
  requirements:
34
- - - ! '>='
33
+ - - '>='
35
34
  - !ruby/object:Gem::Version
36
35
  version: 0.1.1
37
- none: false
38
- version_requirements: !ruby/object:Gem::Requirement
36
+ requirement: !ruby/object:Gem::Requirement
39
37
  requirements:
40
- - - ! '>='
38
+ - - '>='
41
39
  - !ruby/object:Gem::Version
42
40
  version: 0.1.1
43
- none: false
44
- prerelease: false
45
- name: murmurhash3
46
41
  type: :runtime
47
42
  - !ruby/object:Gem::Dependency
48
- requirement: !ruby/object:Gem::Requirement
43
+ prerelease: false
44
+ name: sumbur
45
+ version_requirements: !ruby/object:Gem::Requirement
49
46
  requirements:
50
- - - ! '>='
47
+ - - '>='
51
48
  - !ruby/object:Gem::Version
52
49
  version: 0.0.2
53
- none: false
54
- version_requirements: !ruby/object:Gem::Requirement
50
+ requirement: !ruby/object:Gem::Requirement
55
51
  requirements:
56
- - - ! '>='
52
+ - - '>='
57
53
  - !ruby/object:Gem::Version
58
54
  version: 0.0.2
59
- none: false
60
- prerelease: false
61
- name: sumbur
62
55
  type: :runtime
63
56
  - !ruby/object:Gem::Dependency
64
- requirement: !ruby/object:Gem::Requirement
57
+ prerelease: false
58
+ name: bin_utils
59
+ version_requirements: !ruby/object:Gem::Requirement
65
60
  requirements:
66
61
  - - ~>
67
62
  - !ruby/object:Gem::Version
68
63
  version: 0.0.3
69
- none: false
70
- version_requirements: !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
71
65
  requirements:
72
66
  - - ~>
73
67
  - !ruby/object:Gem::Version
74
68
  version: 0.0.3
75
- none: false
76
- prerelease: false
77
- name: bin_utils
78
69
  type: :runtime
79
70
  description: Tarantool KV-storage client.
80
71
  email:
@@ -87,62 +78,63 @@ extra_rdoc_files:
87
78
  - README.md
88
79
  - LICENSE
89
80
  files:
81
+ - Gemfile
82
+ - LICENSE
83
+ - README.md
84
+ - Rakefile
85
+ - ext/tarantool/extconf.rb
86
+ - ext/tarantool/response_c.c
87
+ - lib/tarantool.rb
88
+ - lib/tarantool/base_record.rb
90
89
  - lib/tarantool/block_db.rb
91
- - lib/tarantool/space_array.rb
90
+ - lib/tarantool/callback_db.rb
91
+ - lib/tarantool/core-ext.rb
92
92
  - lib/tarantool/em_db.rb
93
+ - lib/tarantool/exceptions.rb
94
+ - lib/tarantool/fiber_db.rb
95
+ - lib/tarantool/light_record.rb
93
96
  - lib/tarantool/query.rb
94
- - lib/tarantool/shards_support.rb
97
+ - lib/tarantool/record/select.rb
98
+ - lib/tarantool/request.rb
99
+ - lib/tarantool/response.rb
100
+ - lib/tarantool/serializers.rb
95
101
  - lib/tarantool/serializers/ber_array.rb
96
102
  - lib/tarantool/serializers/bson.rb
97
- - lib/tarantool/version.rb
103
+ - lib/tarantool/shards_support.rb
104
+ - lib/tarantool/space_array.rb
98
105
  - lib/tarantool/space_hash.rb
99
- - lib/tarantool/request.rb
100
- - lib/tarantool/fiber_db.rb
101
- - lib/tarantool/serializers.rb
102
- - lib/tarantool/callback_db.rb
103
- - lib/tarantool/exceptions.rb
104
- - lib/tarantool/light_record.rb
105
- - lib/tarantool/record/select.rb
106
106
  - lib/tarantool/util.rb
107
- - lib/tarantool/core-ext.rb
108
- - lib/tarantool/base_record.rb
109
- - lib/tarantool/response.rb
110
- - lib/tarantool.rb
111
- - ext/tarantool/extconf.rb
112
- - ext/tarantool/response_c.c
113
- - test/shared_query.rb
114
- - test/test_reshard_block.rb
115
- - test/test_space_array_callback.rb
116
- - test/test_reshard_fiber.rb
117
- - test/tarantool1.cfg
118
- - test/test_space_array_callback_nodef.rb
119
- - test/test_shard_replication_fiber.rb
107
+ - lib/tarantool/version.rb
108
+ - test/helper.rb
109
+ - test/init.lua
120
110
  - test/run_all.rb
111
+ - test/shared_query.rb
112
+ - test/shared_record.rb
113
+ - test/shared_replicated_shard.rb
121
114
  - test/shared_reshard.rb
122
- - test/init.lua
123
- - test/helper.rb
124
- - test/test_shard_replication_block.rb
125
- - test/tarantool.log
126
- - test/tarantool.cfg
127
115
  - test/shared_space_array.rb
128
- - test/test_query_fiber.rb
116
+ - test/shared_space_hash.rb
117
+ - test/tarantool.cfg
118
+ - test/tarantool.log
119
+ - test/tarantool1.cfg
129
120
  - test/test_light_record.rb
130
- - test/shared_record.rb
131
- - test/test_space_hash_fiber.rb
121
+ - test/test_light_record_callback.rb
132
122
  - test/test_query_block.rb
123
+ - test/test_query_fiber.rb
124
+ - test/test_reshard_block.rb
125
+ - test/test_reshard_fiber.rb
126
+ - test/test_shard_replication_block.rb
127
+ - test/test_shard_replication_fiber.rb
133
128
  - test/test_space_array_block.rb
134
- - test/shared_space_hash.rb
135
- - test/shared_replicated_shard.rb
129
+ - test/test_space_array_callback.rb
130
+ - test/test_space_array_callback_nodef.rb
136
131
  - test/test_space_array_fiber.rb
137
132
  - test/test_space_hash_block.rb
138
- - test/test_light_record_callback.rb
139
- - Gemfile
140
- - LICENSE
141
- - Rakefile
142
- - README.md
133
+ - test/test_space_hash_fiber.rb
143
134
  homepage: http://github.com/mailru/tarantool-ruby
144
135
  licenses:
145
136
  - BSD-2-Clause
137
+ metadata: {}
146
138
  post_install_message:
147
139
  rdoc_options:
148
140
  - --charset=UTF-8
@@ -151,52 +143,44 @@ require_paths:
151
143
  - ext
152
144
  required_ruby_version: !ruby/object:Gem::Requirement
153
145
  requirements:
154
- - - ! '>='
146
+ - - '>='
155
147
  - !ruby/object:Gem::Version
156
- hash: 2817518417996547938
157
148
  version: '0'
158
- segments:
159
- - 0
160
- none: false
161
149
  required_rubygems_version: !ruby/object:Gem::Requirement
162
150
  requirements:
163
- - - ! '>='
151
+ - - '>='
164
152
  - !ruby/object:Gem::Version
165
- hash: 2817518417996547938
166
153
  version: '0'
167
- segments:
168
- - 0
169
- none: false
170
154
  requirements: []
171
155
  rubyforge_project:
172
- rubygems_version: 1.8.23
156
+ rubygems_version: 2.2.2
173
157
  signing_key:
174
- specification_version: 3
158
+ specification_version: 4
175
159
  summary: Tarantool KV-storage client.
176
160
  test_files:
177
- - test/shared_query.rb
178
- - test/test_reshard_block.rb
179
- - test/test_space_array_callback.rb
180
- - test/test_reshard_fiber.rb
181
- - test/tarantool1.cfg
182
- - test/test_space_array_callback_nodef.rb
183
- - test/test_shard_replication_fiber.rb
161
+ - test/helper.rb
162
+ - test/init.lua
184
163
  - test/run_all.rb
164
+ - test/shared_query.rb
165
+ - test/shared_record.rb
166
+ - test/shared_replicated_shard.rb
185
167
  - test/shared_reshard.rb
186
- - test/init.lua
187
- - test/helper.rb
188
- - test/test_shard_replication_block.rb
189
- - test/tarantool.log
190
- - test/tarantool.cfg
191
168
  - test/shared_space_array.rb
192
- - test/test_query_fiber.rb
169
+ - test/shared_space_hash.rb
170
+ - test/tarantool.cfg
171
+ - test/tarantool.log
172
+ - test/tarantool1.cfg
193
173
  - test/test_light_record.rb
194
- - test/shared_record.rb
195
- - test/test_space_hash_fiber.rb
174
+ - test/test_light_record_callback.rb
196
175
  - test/test_query_block.rb
176
+ - test/test_query_fiber.rb
177
+ - test/test_reshard_block.rb
178
+ - test/test_reshard_fiber.rb
179
+ - test/test_shard_replication_block.rb
180
+ - test/test_shard_replication_fiber.rb
197
181
  - test/test_space_array_block.rb
198
- - test/shared_space_hash.rb
199
- - test/shared_replicated_shard.rb
182
+ - test/test_space_array_callback.rb
183
+ - test/test_space_array_callback_nodef.rb
200
184
  - test/test_space_array_fiber.rb
201
185
  - test/test_space_hash_block.rb
202
- - test/test_light_record_callback.rb
186
+ - test/test_space_hash_fiber.rb