aerospike 2.9.1 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -3
- data/lib/aerospike/node_validator.rb +49 -29
- 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: 61a847f7addabd7b9e7bf77326537e94cc437e99041e664fcd3496ffb7cba843
|
4
|
+
data.tar.gz: '033279bbc6e8410e585ace808aabf4ae469a4bd233c1d80f10c2a488894fc5ad'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b19a2653c7464e185a0d50faff2ac735b990188eee1021627d6eaab55020130797f14b20eb1f98a79a7cc846962d0d45ba47cd03f8e48ddafba48de6b4ac85f
|
7
|
+
data.tar.gz: b550a9058c7c2eed384f1b3635a6f56836aa250248bd48837d72e1ac466a6bb8b06c051122b750e5ccc9f61c7f5736bad12627742e91cf61f215188d1e3dfce8
|
data/CHANGELOG.md
CHANGED
@@ -4,10 +4,15 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
## [Unreleased]
|
6
6
|
|
7
|
+
## [2.10.0] - 2019-05-10
|
8
|
+
|
9
|
+
* **New Features**
|
10
|
+
* Add support for LB discovery / seeding. Thanks to [@filiptepper](https://github.com/filiptepper)! [[#80](https://github.com/aerospike/aerospike-client-ruby/issues/80)]
|
11
|
+
|
7
12
|
## [2.9.1] - 2019-04-03
|
8
13
|
|
9
14
|
* **Bug Fixes**
|
10
|
-
* Query fails if one or more cluster nodes do not have records in the set [[#77](https://github.com/aerospike/aerospike-client-ruby/
|
15
|
+
* Query fails if one or more cluster nodes do not have records in the set [[#77](https://github.com/aerospike/aerospike-client-ruby/issues/77)]
|
11
16
|
|
12
17
|
* **Updates**
|
13
18
|
* Change admin message version to 2 (from 0)
|
@@ -20,10 +25,10 @@ All notable changes to this project will be documented in this file.
|
|
20
25
|
* Add INFINITY and WILDCARD values for use in CDT map/list comparators. [AER-5945]
|
21
26
|
|
22
27
|
* **Bug Fixes**
|
23
|
-
* Default policies set on Client instance do not get applied [[#74](https://github.com/aerospike/aerospike-client-ruby/
|
28
|
+
* Default policies set on Client instance do not get applied [[#74](https://github.com/aerospike/aerospike-client-ruby/issues/74)]
|
24
29
|
|
25
30
|
* **Updates**
|
26
|
-
* *BREAKING CHANGE*: Change default for send_key write policy to false [[#73](https://github.com/aerospike/aerospike-client-ruby/
|
31
|
+
* *BREAKING CHANGE*: Change default for send_key write policy to false [[#73](https://github.com/aerospike/aerospike-client-ruby/issues/73)]
|
27
32
|
* Support truncate info command argument "lut=now" for servers that require it. [AER-5955]
|
28
33
|
|
29
34
|
## [2.8.0] - 2018-08-06
|
@@ -31,42 +31,53 @@ module Aerospike
|
|
31
31
|
@cluster_name = cluster_name
|
32
32
|
@tls_options = tls_options
|
33
33
|
|
34
|
-
|
35
|
-
|
34
|
+
@aliases = []
|
35
|
+
|
36
|
+
resolve(host.name).each do |address|
|
37
|
+
@aliases += get_hosts(address)
|
38
|
+
end
|
36
39
|
end
|
37
40
|
|
38
41
|
private
|
39
42
|
|
40
|
-
def
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
def get_hosts(address)
|
44
|
+
aliases = [get_alias(address, host.port)]
|
45
|
+
|
46
|
+
begin
|
47
|
+
conn = Cluster::CreateConnection.(@cluster, Host.new(address, host.port, host.tls_name))
|
48
|
+
|
49
|
+
commands = %w[node build features]
|
50
|
+
commands << address_command unless is_loopback?(address)
|
51
|
+
|
52
|
+
info_map = Info.request(conn, *commands)
|
53
|
+
|
54
|
+
if node_name = info_map['node']
|
55
|
+
@name = node_name
|
56
|
+
|
57
|
+
# Set features
|
58
|
+
if features = info_map['features']
|
59
|
+
@features = features.split(';').to_set
|
60
|
+
end
|
45
61
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
info_map = Info.request(conn, 'node', 'build', 'features')
|
52
|
-
if node_name = info_map['node']
|
53
|
-
@name = node_name
|
54
|
-
|
55
|
-
# Set features
|
56
|
-
if features = info_map['features']
|
57
|
-
@features = features.split(';').to_set
|
58
|
-
end
|
59
|
-
|
60
|
-
# Check new info protocol support for >= 2.6.6 build
|
61
|
-
if build_version = info_map['build']
|
62
|
-
v1, v2, v3 = parse_version_string(build_version)
|
63
|
-
@use_new_info = v1.to_i > 2 || (v1.to_i == 2 && (v2.to_i > 6 || (v2.to_i == 6 && v3.to_i >= 6)))
|
64
|
-
end
|
62
|
+
# Check new info protocol support for >= 2.6.6 build
|
63
|
+
if build_version = info_map['build']
|
64
|
+
v1, v2, v3 = parse_version_string(build_version)
|
65
|
+
@use_new_info = v1.to_i > 2 || (v1.to_i == 2 && (v2.to_i > 6 || (v2.to_i == 6 && v3.to_i >= 6)))
|
65
66
|
end
|
66
|
-
ensure
|
67
|
-
conn.close if conn
|
68
67
|
end
|
68
|
+
|
69
|
+
unless is_loopback?(address)
|
70
|
+
aliases = info_map[address_command].split(',').map { |address| get_alias(*address.split(':')) }
|
71
|
+
end
|
72
|
+
ensure
|
73
|
+
conn.close if conn
|
69
74
|
end
|
75
|
+
|
76
|
+
aliases.map { |al| Host.new(al[:address], al[:port], host.tls_name) }
|
77
|
+
end
|
78
|
+
|
79
|
+
def get_alias(address, port)
|
80
|
+
{ address: address, port: port }
|
70
81
|
end
|
71
82
|
|
72
83
|
def resolve(hostname)
|
@@ -79,6 +90,15 @@ module Aerospike
|
|
79
90
|
end
|
80
91
|
end
|
81
92
|
|
93
|
+
def address_command
|
94
|
+
@address_command ||= @cluster.tls_enabled? ? 'service-tls-std': 'service-clear-std'
|
95
|
+
end
|
96
|
+
|
97
|
+
def is_loopback?(address)
|
98
|
+
info = Addrinfo.ip(address)
|
99
|
+
info.ipv4_loopback? || info.ipv6_loopback?
|
100
|
+
end
|
101
|
+
|
82
102
|
def is_ip?(hostname)
|
83
103
|
!!((hostname =~ Resolv::IPv4::Regex) || (hostname =~ Resolv::IPv6::Regex))
|
84
104
|
end
|
@@ -91,4 +111,4 @@ module Aerospike
|
|
91
111
|
raise Aerospike::Exceptions::Parse.new("Invalid build version string in Info: #{version}")
|
92
112
|
end
|
93
113
|
end # class
|
94
|
-
end #module
|
114
|
+
end # module
|
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.10.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: 2019-
|
12
|
+
date: 2019-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|