roma 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +44 -1
  3. data/Gemfile.lock +18 -15
  4. data/README.md +15 -1
  5. data/bin/consistency_test +10 -0
  6. data/bin/data_accumulation +11 -0
  7. data/lib/roma/async_process.rb +39 -2
  8. data/lib/roma/command/sys_command_receiver.rb +80 -0
  9. data/lib/roma/command/vn_command_receiver.rb +1 -1
  10. data/lib/roma/config.rb +1 -1
  11. data/lib/roma/plugin/plugin_storage.rb +105 -1
  12. data/lib/roma/romad.rb +13 -1
  13. data/lib/roma/routing/cb_rttable.rb +1 -1
  14. data/lib/roma/tools/consistency_test.rb +77 -0
  15. data/lib/roma/tools/data_accumulation.rb +64 -0
  16. data/lib/roma/version.rb +1 -1
  17. data/lib/roma/write_behind.rb +138 -1
  18. data/test/config4mhash.rb +1 -1
  19. data/test/config4storage_error.rb +1 -1
  20. data/test/config4test.rb +1 -1
  21. data/test/cpdbtest/config4cpdb_base.rb +1 -1
  22. data/test/optional_test/t_mkroute_rich.rb +44 -0
  23. data/test/optional_test/t_other_cpdb.rb +45 -0
  24. data/test/optional_test/t_other_database.rb +59 -0
  25. data/test/{t_routing_logic.rb → optional_test/t_routing_logic.rb} +1 -0
  26. data/test/roma-test-storage.rb +685 -0
  27. data/test/roma-test-utils.rb +24 -0
  28. data/test/run-test.rb +9 -0
  29. data/test/t_command_definition.rb +2 -0
  30. data/test/t_cpdata.rb +1 -0
  31. data/test/t_cpdb.rb +22 -34
  32. data/test/t_eventmachine.rb +1 -0
  33. data/test/t_listplugin.rb +2 -0
  34. data/test/t_logshift.rb +2 -4
  35. data/test/t_mapcountplugin.rb +48 -37
  36. data/test/t_mapplugin.rb +2 -0
  37. data/test/t_mhash.rb +2 -1
  38. data/test/t_new_func.rb +386 -0
  39. data/test/t_protocol.rb +66 -1
  40. data/test/t_rclient.rb +2 -0
  41. data/test/t_replication.rb +299 -0
  42. data/test/t_routing_data.rb +6 -5
  43. data/test/t_storage.rb +5 -740
  44. data/test/t_storage_error.rb +1 -0
  45. data/test/t_writebehind.rb +11 -2
  46. metadata +31 -19
@@ -10,6 +10,7 @@ Roma::Client::RomaClient.class_eval{
10
10
  }
11
11
 
12
12
  class StorageErrorTest < Test::Unit::TestCase
13
+ self.test_order = :defined
13
14
  include RomaTestUtils
14
15
 
15
16
  def setup
@@ -181,6 +181,7 @@ module FileWriterTests
181
181
  end
182
182
 
183
183
  class FileWriterTest < Test::Unit::TestCase
184
+ self.test_order = :defined
184
185
  include FileWriterTests
185
186
 
186
187
  def setup
@@ -195,6 +196,7 @@ class FileWriterTest < Test::Unit::TestCase
195
196
  end
196
197
 
197
198
  class WriteBehindTest < Test::Unit::TestCase
199
+ self.test_order = :defined
198
200
  include FileWriterTests
199
201
  include RomaTestUtils
200
202
 
@@ -209,8 +211,8 @@ class WriteBehindTest < Test::Unit::TestCase
209
211
  def teardown
210
212
  stop_roma
211
213
  Roma::Messaging::ConPool.instance.close_all
212
- rescue => e
213
- puts "#{e} #{$ERROR_POSITION}"
214
+ rescue => e
215
+ puts "#{e} #{$ERROR_POSITION}"
214
216
  end
215
217
 
216
218
  def test_wb2_stat
@@ -228,6 +230,7 @@ class WriteBehindTest < Test::Unit::TestCase
228
230
  send_cmd('localhost_11211', 'wb_command_map {:set=>1}')
229
231
  assert_equal('STORED', @rc.set('abc', 'value abc', 0, true))
230
232
  send_cmd('localhost_11211', 'writebehind_rotate roma')
233
+ sleep 1
231
234
 
232
235
  wb0 = read_wb("#{wb_path}/0.wb")
233
236
  assert_equal(1, wb0.length)
@@ -244,6 +247,7 @@ class WriteBehindTest < Test::Unit::TestCase
244
247
  assert_equal('STORED', @rc.set('abc', 'val1', 0, true))
245
248
  assert_equal('STORED', @rc.set('abc', 'val2', 0, true))
246
249
  send_cmd('localhost_11211', 'writebehind_rotate roma')
250
+ sleep 1
247
251
 
248
252
  res = [[1, 'abc', 'val1'], [2, 'abc', 'val1'], [1, 'abc', 'val2']]
249
253
  wb0 = read_wb("#{wb_path}/0.wb")
@@ -276,6 +280,7 @@ class WriteBehindTest < Test::Unit::TestCase
276
280
  res = send_cmd('localhost_11211', 'set_expt abc 100')
277
281
  assert_equal('STORED', res.chomp)
278
282
  send_cmd('localhost_11211', 'writebehind_rotate roma')
283
+ sleep 1
279
284
 
280
285
  res = { 1 => '1', 2 => '1', 3 => '1', 4 => '2', 5 => '23', 6 => '123', 7 => '128', 8 => '129', 9 => '128', 10 => nil }
281
286
  wb0 = read_wb("#{wb_path}/0.wb")
@@ -316,6 +321,7 @@ class WriteBehindTest < Test::Unit::TestCase
316
321
  assert_equal('STORED', res.chomp)
317
322
 
318
323
  send_cmd('localhost_11211', 'writebehind_rotate roma')
324
+ sleep 1
319
325
 
320
326
  res = [
321
327
  [1, 'abc', '1'], [12, 'abc', '1'],
@@ -379,6 +385,7 @@ class WriteBehindTest < Test::Unit::TestCase
379
385
  assert_equal('DELETED', @rc.alist_delete_at('abc', 1)) # ['13','5','4','2','1','8','9','10','12']
380
386
  assert_equal('CLEARED', @rc.alist_clear('abc'))
381
387
  send_cmd('localhost_11211', 'writebehind_rotate roma')
388
+ sleep 1
382
389
 
383
390
  res = {
384
391
  10 => '1', 4 => '2', 5 => '3', 6 => '4', 7 => '5', 8 => '6', 9 => '7', 11 => '8', 12 => '9',
@@ -408,6 +415,7 @@ class WriteBehindTest < Test::Unit::TestCase
408
415
  assert_equal('STORED', @rc.map_set('abc', 'mapkey1', 'value1'))
409
416
  assert_equal('CLEARED', @rc.map_clear('abc'))
410
417
  send_cmd('localhost_11211', 'writebehind_rotate roma')
418
+ sleep 1
411
419
 
412
420
  res = { 1 => { 'mapkey1' => 'value1' }, 2 => {}, 3 => {} }
413
421
  wb0 = read_wb("#{wb_path}/0.wb")
@@ -435,6 +443,7 @@ class WriteBehindTest < Test::Unit::TestCase
435
443
  assert_equal('STORED', @rc.map_set('abc', 'mapkey1', 'value1'))
436
444
  assert_equal('CLEARED', @rc.map_clear('abc'))
437
445
  send_cmd('localhost_11211', 'writebehind_rotate roma')
446
+ sleep 1
438
447
 
439
448
  res = [
440
449
  [1, { 'mapkey1' => 'value1' }],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Junji Torii
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-08-19 00:00:00.000000000 Z
13
+ date: 2016-01-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: eventmachine
@@ -128,29 +128,31 @@ description: |2
128
128
  ROMA is one of the data storing systems for distributed key-value stores. It is a completely decentralized distributed system that consists of multiple processes, called nodes, on several machines. It is based on pure P2P architecture like a distributed hash table, thus it provides high availability and scalability.
129
129
  email:
130
130
  executables:
131
- - tribunus
132
- - cpdb
133
- - recoverlost_alist_all
134
- - log_merger
135
- - check_tc_flag
136
131
  - ssroute
137
- - safecopy_test
132
+ - recoverlost
133
+ - key_list
134
+ - data_accumulation
135
+ - key_access
136
+ - simple_bench
138
137
  - mkconfig
138
+ - tribunus
139
139
  - safecopy_integration_test
140
- - roma-adm
141
- - simple_bench
142
- - mkrecent
143
- - recoverlost
144
140
  - mkroute
145
- - recoverlost_alist
146
- - key_access
147
- - key_list
148
- - multi_commander
141
+ - recoverlost_alist_all
142
+ - roma-adm
149
143
  - roma_watcher
144
+ - mkrecent
150
145
  - recoverlost_alist_keys
151
- - chg_redundancy
152
146
  - test-scenario
147
+ - chg_redundancy
148
+ - check_tc_flag
149
+ - consistency_test
150
+ - recoverlost_alist
151
+ - multi_commander
152
+ - cpdb
153
+ - safecopy_test
153
154
  - romad
155
+ - log_merger
154
156
  extensions: []
155
157
  extra_rdoc_files:
156
158
  - README.md
@@ -164,7 +166,9 @@ files:
164
166
  - Rakefile
165
167
  - bin/check_tc_flag
166
168
  - bin/chg_redundancy
169
+ - bin/consistency_test
167
170
  - bin/cpdb
171
+ - bin/data_accumulation
168
172
  - bin/key_access
169
173
  - bin/key_list
170
174
  - bin/log_merger
@@ -231,7 +235,9 @@ files:
231
235
  - lib/roma/storage/tc_storage.rb
232
236
  - lib/roma/tools/check_tc_flag.rb
233
237
  - lib/roma/tools/chg_redundancy.rb
238
+ - lib/roma/tools/consistency_test.rb
234
239
  - lib/roma/tools/cpdb.rb
240
+ - lib/roma/tools/data_accumulation.rb
235
241
  - lib/roma/tools/key_access.rb
236
242
  - lib/roma/tools/key_list.rb
237
243
  - lib/roma/tools/log_merger.rb
@@ -269,7 +275,12 @@ files:
269
275
  - test/cpdbtest/config4cpdb_sqlite3.rb
270
276
  - test/cpdbtest/config4cpdb_tc.rb
271
277
  - test/cpdbtest/config4cpdb_tcmem.rb
278
+ - test/optional_test/t_mkroute_rich.rb
279
+ - test/optional_test/t_other_cpdb.rb
280
+ - test/optional_test/t_other_database.rb
281
+ - test/optional_test/t_routing_logic.rb
272
282
  - test/rcirb.rb
283
+ - test/roma-test-storage.rb
273
284
  - test/roma-test-utils.rb
274
285
  - test/run-test.rb
275
286
  - test/storage_error_storage.rb
@@ -282,10 +293,11 @@ files:
282
293
  - test/t_mapcountplugin.rb
283
294
  - test/t_mapplugin.rb
284
295
  - test/t_mhash.rb
296
+ - test/t_new_func.rb
285
297
  - test/t_protocol.rb
286
298
  - test/t_rclient.rb
299
+ - test/t_replication.rb
287
300
  - test/t_routing_data.rb
288
- - test/t_routing_logic.rb
289
301
  - test/t_storage.rb
290
302
  - test/t_storage_error.rb
291
303
  - test/t_writebehind.rb
@@ -314,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
314
326
  version: '0'
315
327
  requirements: []
316
328
  rubyforge_project:
317
- rubygems_version: 2.2.2
329
+ rubygems_version: 2.4.8
318
330
  signing_key:
319
331
  specification_version: 4
320
332
  summary: ROMA server