aerospike 2.17.0 → 2.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/aerospike/client.rb +1 -1
- data/lib/aerospike/command/command.rb +7 -3
- data/lib/aerospike/result_code.rb +89 -0
- data/lib/aerospike/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35e9a8a3ec876281db49c949373f2e1f34fb38ed86f4cf62074990ef66637e22
|
4
|
+
data.tar.gz: 9fcd59bb4c7137be98624f6de64beff53ec0d526309ea7403e7e2596057c216b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da0e22181c8410de556a7f5baf7d14a53ad0ddacc95e3a24e7442ab15196b70bfd4c79259ea9502ec18dc9cb1978d68c1b5bc5192dbba4821d267d8497c0e8ba
|
7
|
+
data.tar.gz: 02b0fe95378602aed2d7cb232f61453d87cac2824c4b832cd40187925376f37afef6df3a7b1c1261f426e898f8f4d82136f3da42edf454834a0c91f913318e5d
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [2.18.0] - 2020-12-01
|
6
|
+
|
7
|
+
* **Bug Fixes**
|
8
|
+
* Avoid panic if `Command#get_node` fails in `Command#execute`. Resolves issue #101.
|
9
|
+
* Fix wrong method invocation inside `Client#truncate` method. Thanks to [Alexander](https://github.com/selivandex)
|
10
|
+
|
11
|
+
* **Improvements**
|
12
|
+
* Added missing server error codes.
|
13
|
+
|
5
14
|
## [2.17.0] - 2020-10-15
|
6
15
|
|
7
16
|
* **New Features**
|
data/lib/aerospike/client.rb
CHANGED
@@ -233,7 +233,7 @@ module Aerospike
|
|
233
233
|
str_cmd = "truncate:namespace=#{namespace}"
|
234
234
|
str_cmd << ";set=#{set_name}" unless set_name.to_s.strip.empty?
|
235
235
|
else
|
236
|
-
if node.supports_feature(Aerospike::Features::TRUNCATE_NAMESPACE)
|
236
|
+
if node.supports_feature?(Aerospike::Features::TRUNCATE_NAMESPACE)
|
237
237
|
str_cmd = "truncate-namespace:namespace=#{namespace}"
|
238
238
|
else
|
239
239
|
str_cmd = "truncate:namespace=#{namespace}"
|
@@ -446,10 +446,14 @@ module Aerospike
|
|
446
446
|
@node = get_node
|
447
447
|
@conn = @node.get_connection(@policy.timeout)
|
448
448
|
rescue => e
|
449
|
-
|
450
|
-
|
449
|
+
if @node
|
450
|
+
# Socket connection error has occurred. Decrease health and retry.
|
451
|
+
@node.decrease_health
|
451
452
|
|
452
|
-
|
453
|
+
Aerospike.logger.error("Node #{@node.to_s}: #{e}")
|
454
|
+
else
|
455
|
+
Aerospike.logger.error("No node available for transaction: #{e}")
|
456
|
+
end
|
453
457
|
next
|
454
458
|
end
|
455
459
|
|
@@ -132,8 +132,13 @@ module Aerospike
|
|
132
132
|
# There are no more records left for query.
|
133
133
|
QUERY_END = 50
|
134
134
|
|
135
|
+
# Security functionality not supported by connected server.
|
135
136
|
SECURITY_NOT_SUPPORTED = 51
|
137
|
+
|
138
|
+
# Security functionality not enabled by connected server.
|
136
139
|
SECURITY_NOT_ENABLED = 52
|
140
|
+
|
141
|
+
# Security scheme not supported.
|
137
142
|
SECURITY_SCHEME_NOT_SUPPORTED = 53
|
138
143
|
|
139
144
|
# Administration command is invalid.
|
@@ -162,6 +167,9 @@ module Aerospike
|
|
162
167
|
# Security credential is invalid.
|
163
168
|
INVALID_CREDENTIAL = 65
|
164
169
|
|
170
|
+
# Expired session token.
|
171
|
+
EXPIRED_SESSION = 66
|
172
|
+
|
165
173
|
# Role name is invalid.
|
166
174
|
INVALID_ROLE = 70
|
167
175
|
|
@@ -171,15 +179,48 @@ module Aerospike
|
|
171
179
|
# Privilege is invalid.
|
172
180
|
INVALID_PRIVILEGE = 72
|
173
181
|
|
182
|
+
# Specified IP whitelist is invalid.
|
183
|
+
INVALID_WHITELIST = 73
|
184
|
+
|
174
185
|
# User must be authentication before performing database operations.
|
175
186
|
NOT_AUTHENTICATED = 80
|
176
187
|
|
177
188
|
# User does not posses the required role to perform the database operation.
|
178
189
|
ROLE_VIOLATION = 81
|
179
190
|
|
191
|
+
# Client IP address is not on the IP whitelist.
|
192
|
+
NOT_WHITELISTED = 82
|
193
|
+
|
194
|
+
# LDAP feature not enabled on server.
|
195
|
+
LDAP_NOT_ENABLED = 90
|
196
|
+
|
197
|
+
# Error in LDAP setup.
|
198
|
+
LDAP_SETUP = 91
|
199
|
+
|
200
|
+
# Error in LDAP TLS setup.
|
201
|
+
LDAP_TLS_SETUP = 92
|
202
|
+
|
203
|
+
# Error authenticating LDAP user.
|
204
|
+
LDAP_AUTHENTICATION = 93
|
205
|
+
|
206
|
+
# Error querying LDAP server.
|
207
|
+
LDAP_QUERY = 94
|
208
|
+
|
180
209
|
# A user defined function returned an error code.
|
181
210
|
UDF_BAD_RESPONSE = 100
|
182
211
|
|
212
|
+
# Batch functionality has been disabled by configuring the batch-index-thread=0.
|
213
|
+
BATCH_DISABLED = 150
|
214
|
+
|
215
|
+
# Batch max requests has been exceeded.
|
216
|
+
BATCH_MAX_REQUESTS = 151
|
217
|
+
|
218
|
+
# All batch queues are full.
|
219
|
+
BATCH_QUEUES_FULL = 152
|
220
|
+
|
221
|
+
# GeoJSON is malformed or not supported.
|
222
|
+
INVALID_GEOJSON = 160
|
223
|
+
|
183
224
|
# Secondary index already exists.
|
184
225
|
INDEX_FOUND = 200
|
185
226
|
|
@@ -213,6 +254,12 @@ module Aerospike
|
|
213
254
|
# Generic query error.
|
214
255
|
QUERY_GENERIC = 213
|
215
256
|
|
257
|
+
# Network error. Query is aborted.
|
258
|
+
QUERY_NET_IO = 214
|
259
|
+
|
260
|
+
# Internal error.
|
261
|
+
QUERY_DUPLICATE = 215
|
262
|
+
|
216
263
|
def self.message(code)
|
217
264
|
case code
|
218
265
|
when COMMAND_REJECTED
|
@@ -356,6 +403,9 @@ module Aerospike
|
|
356
403
|
when INVALID_CREDENTIAL
|
357
404
|
"Invalid credential"
|
358
405
|
|
406
|
+
when EXPIRED_SESSION
|
407
|
+
"Expired session token"
|
408
|
+
|
359
409
|
when INVALID_ROLE
|
360
410
|
"Invalid role"
|
361
411
|
|
@@ -365,15 +415,48 @@ module Aerospike
|
|
365
415
|
when INVALID_PRIVILEGE
|
366
416
|
"Invalid privilege"
|
367
417
|
|
418
|
+
when INVALID_WHITELIST
|
419
|
+
"Specified IP whitelist is invalid"
|
420
|
+
|
368
421
|
when NOT_AUTHENTICATED
|
369
422
|
"Not authenticated"
|
370
423
|
|
371
424
|
when ROLE_VIOLATION
|
372
425
|
"Role violation"
|
373
426
|
|
427
|
+
when NOT_WHITELISTED
|
428
|
+
"Client IP address is not on the IP whitelist"
|
429
|
+
|
430
|
+
when LDAP_NOT_ENABLED
|
431
|
+
"LDAP feature not enabled on server"
|
432
|
+
|
433
|
+
when LDAP_SETUP
|
434
|
+
"Error in LDAP setup"
|
435
|
+
|
436
|
+
when LDAP_TLS_SETUP
|
437
|
+
"Error in LDAP TLS setup"
|
438
|
+
|
439
|
+
when LDAP_AUTHENTICATION
|
440
|
+
"Error authenticating LDAP user"
|
441
|
+
|
442
|
+
when LDAP_QUERY
|
443
|
+
"Error querying LDAP server"
|
444
|
+
|
374
445
|
when UDF_BAD_RESPONSE
|
375
446
|
"UDF d error"
|
376
447
|
|
448
|
+
when BATCH_DISABLED
|
449
|
+
"Batch functionality has been disabled by configuring the batch-index-thread=0"
|
450
|
+
|
451
|
+
when BATCH_MAX_REQUESTS
|
452
|
+
"Batch max requests has been exceeded"
|
453
|
+
|
454
|
+
when BATCH_QUEUES_FULL
|
455
|
+
"All batch queues are full"
|
456
|
+
|
457
|
+
when INVALID_GEOJSON
|
458
|
+
"GeoJSON is malformed or not supported"
|
459
|
+
|
377
460
|
when INDEX_FOUND
|
378
461
|
"Index already exists"
|
379
462
|
|
@@ -407,6 +490,12 @@ module Aerospike
|
|
407
490
|
when QUERY_GENERIC
|
408
491
|
"Query error"
|
409
492
|
|
493
|
+
when QUERY_NET_IO
|
494
|
+
"Network error. Query is aborted"
|
495
|
+
|
496
|
+
when QUERY_DUPLICATE
|
497
|
+
"Internal query error"
|
498
|
+
|
410
499
|
else
|
411
500
|
"ResultCode #{code} unknown in the client. Please file a github issue."
|
412
501
|
end # case
|
data/lib/aerospike/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aerospike
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Khosrow Afroozeh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|