roma 0.8.13p1 → 0.8.13
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +0 -8
- data/Rakefile +2 -2
- data/ruby/server/lib/roma/async_process.rb +2 -2
- data/ruby/server/lib/roma/command/vn_command_receiver.rb +3 -9
- data/ruby/server/lib/roma/event/handler.rb +5 -11
- data/ruby/server/lib/roma/romad.rb +1 -3
- data/ruby/server/lib/roma/stats.rb +0 -18
- data/ruby/server/lib/roma/version.rb +1 -1
- metadata +5 -6
- data/Gemfile +0 -17
data/CHANGELOG
CHANGED
@@ -1,11 +1,3 @@
|
|
1
|
-
*0.8.13-p1 (Jan 15 2014)*
|
2
|
-
|
3
|
-
* add timeout parameter for a vnode copy [junji torii] 0522750
|
4
|
-
* remove some debug log [hiroaki-iwase] 94d96dc
|
5
|
-
* Add Gemfile. [Hiroki Matsue] 9029bf8
|
6
|
-
* Ignore test related files. [Hiroki Matsue] 556a931
|
7
|
-
* fix:add rescue in timer_event_1sec [junji torii] 11cc4ea
|
8
|
-
|
9
1
|
*0.8.13 (Sep 12 2013)*
|
10
2
|
|
11
3
|
* change target ruby version about encoding problem (upper 1.9.2 => upper 1.9.1) [hiroaki-iwase] e56d2f4
|
data/Rakefile
CHANGED
@@ -39,8 +39,8 @@ EXEC_TABLE = Dir.entries(base + 'bin').reject{ |d| d =~ /^\.+$/ || d =~ /^sample
|
|
39
39
|
require File.expand_path(File.join('ruby', 'server', 'lib', 'roma', 'version'), File.dirname(__FILE__))
|
40
40
|
VER_NUM = Roma::VERSION
|
41
41
|
|
42
|
-
if VER_NUM =~ /([0-9.
|
43
|
-
CURRENT_VERSION = $1
|
42
|
+
if VER_NUM =~ /([0-9.]+)$/
|
43
|
+
CURRENT_VERSION = $1
|
44
44
|
else
|
45
45
|
CURRENT_VERSION = "0.0.0"
|
46
46
|
end
|
@@ -462,11 +462,11 @@ module Roma
|
|
462
462
|
Roma::Messaging::ConPool.instance.return_connection(src_nid,con)
|
463
463
|
# waiting for pushv
|
464
464
|
count = 0
|
465
|
-
while @rttable.search_nodes(vn).include?(@stats.ap_str)==false && count <
|
465
|
+
while @rttable.search_nodes(vn).include?(@stats.ap_str)==false && count < 300
|
466
466
|
sleep 0.1
|
467
467
|
count += 1
|
468
468
|
end
|
469
|
-
if count >=
|
469
|
+
if count >= 300
|
470
470
|
@log.warn("#{__method__}:request has been time-out.vn=#{vn} nid=#{src_nid}")
|
471
471
|
return :timeout
|
472
472
|
end
|
@@ -45,20 +45,14 @@ module Roma
|
|
45
45
|
count = rcount = 0
|
46
46
|
@log.debug("#{__method__}:#{s.inspect} received.")
|
47
47
|
loop {
|
48
|
-
context_bin = read_bytes(20,
|
48
|
+
context_bin = read_bytes(20, 100)
|
49
49
|
vn, last, clk, expt, klen = context_bin.unpack('NNNNN')
|
50
50
|
break if klen == 0 # end of dump ?
|
51
51
|
k = read_bytes(klen)
|
52
|
-
vlen_bin = read_bytes(4,
|
52
|
+
vlen_bin = read_bytes(4, 100)
|
53
53
|
vlen, = vlen_bin.unpack('N')
|
54
54
|
if vlen != 0
|
55
|
-
|
56
|
-
@log.warn("#{__method__}:Too long key: key = #{k}")
|
57
|
-
end
|
58
|
-
if vlen > @stats.spushv_vlength_warn
|
59
|
-
@log.warn("#{__method__}:Too long value: key = #{k} vlen = #{vlen}")
|
60
|
-
end
|
61
|
-
v = read_bytes(vlen, @stats.spushv_read_timeout)
|
55
|
+
v = read_bytes(vlen, 100)
|
62
56
|
|
63
57
|
createhash(s[1]) unless @storages[s[1]]
|
64
58
|
if @storages[s[1]].load_stream_dump(vn, last, clk, expt, k, v)
|
@@ -50,15 +50,7 @@ module Roma
|
|
50
50
|
@@connection_expire_time
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
def self.timeout=(n)
|
55
|
-
@@timeout = n
|
56
|
-
end
|
57
|
-
|
58
|
-
def self.timeout
|
59
|
-
@@timeout
|
60
|
-
end
|
61
|
-
|
53
|
+
attr_accessor :timeout
|
62
54
|
attr_reader :connected
|
63
55
|
attr_reader :lastcmd
|
64
56
|
attr_reader :last_access
|
@@ -79,6 +71,7 @@ module Roma
|
|
79
71
|
|
80
72
|
@storages = storages
|
81
73
|
@rttable = rttable
|
74
|
+
@timeout = 10
|
82
75
|
@log = Roma::Logging::RLogger.instance
|
83
76
|
@last_access = Time.now
|
84
77
|
end
|
@@ -103,6 +96,7 @@ module Roma
|
|
103
96
|
end
|
104
97
|
|
105
98
|
def unbind
|
99
|
+
@log.debug("Roma::Event::Handler.unbind called")
|
106
100
|
@connected=false
|
107
101
|
begin
|
108
102
|
@fiber.resume
|
@@ -150,7 +144,7 @@ module Roma
|
|
150
144
|
|
151
145
|
def dispatcher
|
152
146
|
@stats = Roma::Stats.instance
|
153
|
-
|
147
|
+
@log.debug("Roma::Event::Handler.dipatcher called")
|
154
148
|
while(@connected) do
|
155
149
|
@enter_time = nil
|
156
150
|
next unless s=gets
|
@@ -230,7 +224,7 @@ module Roma
|
|
230
224
|
else
|
231
225
|
remain = size - @rbuf.size
|
232
226
|
Fiber.yield(remain)
|
233
|
-
if Time.now.to_i - t >
|
227
|
+
if Time.now.to_i - t > @timeout * mult
|
234
228
|
@log.warn("#{__FILE__}:#{__LINE__}:#{@addr}:#{@port} read_bytes time out");
|
235
229
|
close_connection
|
236
230
|
return nil
|
@@ -521,8 +521,6 @@ module Roma
|
|
521
521
|
@stats.run_storage_clean_up
|
522
522
|
stop_clean_up
|
523
523
|
end
|
524
|
-
rescue Exception =>e
|
525
|
-
@log.error("#{e}\n#{$@}")
|
526
524
|
end
|
527
525
|
|
528
526
|
def timer_event_10sec
|
@@ -541,7 +539,7 @@ module Roma
|
|
541
539
|
@log.warn("failover disable now!!")
|
542
540
|
else
|
543
541
|
version_check
|
544
|
-
@rttable.delete_old_trans
|
542
|
+
@rttable.delete_old_trans
|
545
543
|
start_sync_routing_process
|
546
544
|
end
|
547
545
|
|
@@ -63,14 +63,6 @@ module Roma
|
|
63
63
|
attr_accessor :latency_data
|
64
64
|
#attr_accessor :latency_denominator
|
65
65
|
|
66
|
-
# for vnode copy parameter
|
67
|
-
attr_accessor :spushv_klength_warn
|
68
|
-
attr_accessor :spushv_vlength_warn
|
69
|
-
attr_accessor :spushv_read_timeout
|
70
|
-
attr_accessor :reqpushv_timeout_count
|
71
|
-
|
72
|
-
attr_accessor :routing_trans_timeout
|
73
|
-
|
74
66
|
def initialize
|
75
67
|
@config_path = nil
|
76
68
|
@run_recover = false
|
@@ -100,11 +92,6 @@ module Roma
|
|
100
92
|
@latency_check_cmd =["get", "set", "delete"]
|
101
93
|
@latency_check_time_count = nil
|
102
94
|
@latency_data = Hash.new { |hash,key| hash[key] = {} } #double hash
|
103
|
-
@spushv_klength_warn = 1024 # 1kB
|
104
|
-
@spushv_vlength_warn = 1024 * 1024 # 1MB
|
105
|
-
@spushv_read_timeout = 100
|
106
|
-
@reqpushv_timeout_count = 300 # 0.1 * 300 sec
|
107
|
-
@routing_trans_timeout = 3600 * 3 # 3hr
|
108
95
|
end
|
109
96
|
|
110
97
|
def ap_str
|
@@ -145,11 +132,6 @@ module Roma
|
|
145
132
|
ret['stats.latency_log'] = @latency_log
|
146
133
|
ret['stats.latency_check_cmd'] = @latency_check_cmd
|
147
134
|
ret['stats.latency_check_time_count'] = @latency_check_time_count
|
148
|
-
ret['stats.spushv_klength_warn'] = @spushv_klength_warn
|
149
|
-
ret['stats.spushv_vlength_warn'] = @spushv_vlength_warn
|
150
|
-
ret['stats.spushv_read_timeout'] = @spushv_read_timeout
|
151
|
-
ret['stats.reqpushv_timeout_count'] = @reqpushv_timeout_count
|
152
|
-
ret['stats.routing_trans_timeout'] = @routing_trans_timeout
|
153
135
|
ret
|
154
136
|
end
|
155
137
|
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
5
|
-
prerelease:
|
4
|
+
version: 0.8.13
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Junji Torii
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: ruby/server/bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: eventmachine
|
@@ -57,7 +57,6 @@ extra_rdoc_files:
|
|
57
57
|
- CHANGELOG
|
58
58
|
files:
|
59
59
|
- CHANGELOG
|
60
|
-
- Gemfile
|
61
60
|
- LICENSE
|
62
61
|
- README
|
63
62
|
- Rakefile
|
@@ -184,9 +183,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
184
|
none: false
|
186
185
|
requirements:
|
187
|
-
- - ! '
|
186
|
+
- - ! '>='
|
188
187
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
188
|
+
version: '0'
|
190
189
|
requirements: []
|
191
190
|
rubyforge_project:
|
192
191
|
rubygems_version: 1.8.25
|
data/Gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gem 'eventmachine'
|
4
|
-
|
5
|
-
# Back-end storages
|
6
|
-
group :tokyocabinet do
|
7
|
-
gem 'tokyocabinet', :git => 'https://github.com/roma/tokyocabinet-ruby.git'
|
8
|
-
end
|
9
|
-
|
10
|
-
group :gdbm do
|
11
|
-
gem 'ffi'
|
12
|
-
gem 'gdbm'
|
13
|
-
end
|
14
|
-
|
15
|
-
group :sqlite3 do
|
16
|
-
gem 'sqlite3'
|
17
|
-
end
|