higgs 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +28 -1
- data/Rakefile +80 -0
- data/bin/higgs_apply_jlog +1 -1
- data/bin/higgs_backup +1 -1
- data/bin/higgs_dump_index +1 -1
- data/bin/higgs_dump_jlog +1 -1
- data/bin/higgs_ping +1 -1
- data/bin/higgs_verify +1 -1
- data/{LICENSE → lib/LICENSE} +1 -1
- data/lib/cgi/session/higgs.rb +3 -3
- data/lib/higgs/block.rb +4 -4
- data/lib/higgs/cache.rb +5 -5
- data/lib/higgs/dbm.rb +4 -4
- data/lib/higgs/exceptions.rb +4 -4
- data/lib/higgs/flock.rb +4 -4
- data/lib/higgs/index.rb +9 -9
- data/lib/higgs/jcompat.rb +102 -0
- data/lib/higgs/jlog.rb +4 -4
- data/lib/higgs/lock.rb +6 -6
- data/lib/higgs/services.rb +4 -4
- data/lib/higgs/sman.rb +4 -4
- data/lib/higgs/storage.rb +6 -7
- data/lib/higgs/store.rb +4 -4
- data/lib/higgs/tar.rb +10 -4
- data/lib/higgs/thread.rb +58 -90
- data/lib/higgs/tman.rb +5 -5
- data/lib/higgs/utils/bman.rb +4 -4
- data/lib/higgs/utils.rb +4 -4
- data/lib/higgs/version.rb +5 -5
- data/lib/higgs.rb +4 -3
- data/misc/cache_bench/cache_bench.rb +1 -1
- data/misc/dbm_bench/.strc +1 -1
- data/misc/dbm_bench/Rakefile +1 -1
- data/misc/dbm_bench/dbm_multi_thread.rb +1 -1
- data/misc/dbm_bench/dbm_rnd_delete.rb +1 -1
- data/misc/dbm_bench/dbm_rnd_read.rb +1 -1
- data/misc/dbm_bench/dbm_rnd_update.rb +1 -1
- data/misc/dbm_bench/dbm_seq_read.rb +1 -1
- data/misc/dbm_bench/dbm_seq_write.rb +1 -1
- data/misc/dbm_bench/run.rb +1 -1
- data/misc/dbm_bench/st_verify.rb +1 -1
- data/misc/io_bench/cksum_bench.rb +1 -1
- data/misc/io_bench/jlog_bench.rb +1 -1
- data/misc/io_bench/write_bench.rb +1 -1
- data/misc/thread_bench/lock_bench.rb +1 -1
- data/mkrdoc.rb +11 -0
- data/rdoc.yml +9 -0
- data/test/Rakefile +1 -1
- data/test/run.rb +3 -1
- data/test/test_block.rb +1 -1
- data/test/test_cache.rb +3 -3
- data/test/test_cache_mvcc.rb +5 -5
- data/test/test_cgi_session.rb +3 -3
- data/test/test_dbm.rb +7 -7
- data/test/test_flock.rb +1 -1
- data/test/test_index.rb +5 -5
- data/test/test_jlog.rb +1 -1
- data/test/test_lock.rb +3 -3
- data/test/test_online_backup.rb +1 -1
- data/test/test_replication.rb +3 -3
- data/test/test_services.rb +1 -1
- data/test/test_storage.rb +78 -66
- data/test/test_storage_conf.rb +1 -1
- data/test/test_storage_init_opts.rb +1 -1
- data/test/test_store.rb +7 -7
- data/test/test_tar.rb +11 -11
- data/test/test_thread.rb +6 -6
- data/test/test_tman.rb +4 -4
- data/test/test_tman_init_opts.rb +1 -1
- data/test/test_tman_mvcc.rb +2 -2
- data/test/test_utils_bman.rb +1 -1
- metadata +7 -5
data/test/test_store.rb
CHANGED
@@ -10,14 +10,14 @@ module Higgs::Test
|
|
10
10
|
include Higgs
|
11
11
|
|
12
12
|
# for ident(1)
|
13
|
-
CVS_ID = '$Id: test_store.rb
|
13
|
+
CVS_ID = '$Id: test_store.rb 1609 2009-05-09 11:39:26Z toki $'
|
14
14
|
|
15
15
|
def setup
|
16
16
|
@test_dir = 'store_test'
|
17
17
|
FileUtils.rm_rf(@test_dir) # for debug
|
18
18
|
FileUtils.mkdir_p(@test_dir)
|
19
|
-
@
|
20
|
-
@st = Store.new(@
|
19
|
+
@st_name = File.join(@test_dir, 'foo')
|
20
|
+
@st = Store.new(@st_name,
|
21
21
|
:logger => proc{|path|
|
22
22
|
logger = Logger.new(path, 1)
|
23
23
|
logger.level = Logger::DEBUG
|
@@ -215,13 +215,13 @@ module Higgs::Test
|
|
215
215
|
include Higgs
|
216
216
|
|
217
217
|
# for ident(1)
|
218
|
-
CVS_ID = '$Id: test_store.rb
|
218
|
+
CVS_ID = '$Id: test_store.rb 1609 2009-05-09 11:39:26Z toki $'
|
219
219
|
|
220
220
|
def setup
|
221
221
|
@test_dir = 'store_test'
|
222
222
|
FileUtils.rm_rf(@test_dir) # for debug
|
223
223
|
FileUtils.mkdir_p(@test_dir)
|
224
|
-
@
|
224
|
+
@st_name = File.join(@test_dir, 'foo')
|
225
225
|
end
|
226
226
|
|
227
227
|
def teardown
|
@@ -229,13 +229,13 @@ module Higgs::Test
|
|
229
229
|
end
|
230
230
|
|
231
231
|
def test_open
|
232
|
-
Store.open(@
|
232
|
+
Store.open(@st_name) {|st|
|
233
233
|
st.transaction{|tx|
|
234
234
|
tx[:foo] = :apple
|
235
235
|
}
|
236
236
|
}
|
237
237
|
|
238
|
-
Store.open(@
|
238
|
+
Store.open(@st_name, :read_only => true) {|st|
|
239
239
|
st.transaction{|tx|
|
240
240
|
assert_equal(:apple, tx[:foo])
|
241
241
|
}
|
data/test/test_tar.rb
CHANGED
@@ -9,7 +9,7 @@ module Higgs::Test
|
|
9
9
|
include Higgs::Tar
|
10
10
|
|
11
11
|
# for ident(1)
|
12
|
-
CVS_ID = '$Id: test_tar.rb
|
12
|
+
CVS_ID = '$Id: test_tar.rb 789 2008-07-30 15:41:21Z toki $'
|
13
13
|
|
14
14
|
def test_padding_size
|
15
15
|
assert_equal(0, Block.padding_size(0))
|
@@ -68,7 +68,7 @@ module Higgs::Test
|
|
68
68
|
|
69
69
|
class TarIOReadTest < Test::Unit::TestCase
|
70
70
|
# for ident(1)
|
71
|
-
CVS_ID = '$Id: test_tar.rb
|
71
|
+
CVS_ID = '$Id: test_tar.rb 789 2008-07-30 15:41:21Z toki $'
|
72
72
|
|
73
73
|
def open_for_read(filename)
|
74
74
|
File.open(filename, 'rb')
|
@@ -139,10 +139,10 @@ module Higgs::Test
|
|
139
139
|
include Higgs::Tar
|
140
140
|
|
141
141
|
# for ident(1)
|
142
|
-
CVS_ID = '$Id: test_tar.rb
|
142
|
+
CVS_ID = '$Id: test_tar.rb 789 2008-07-30 15:41:21Z toki $'
|
143
143
|
|
144
144
|
def open_for_read(filename)
|
145
|
-
RawIO.
|
145
|
+
RawIO.open(filename, 'rb')
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
@@ -151,7 +151,7 @@ module Higgs::Test
|
|
151
151
|
include Higgs::Tar::Block
|
152
152
|
|
153
153
|
# for ident(1)
|
154
|
-
CVS_ID = '$Id: test_tar.rb
|
154
|
+
CVS_ID = '$Id: test_tar.rb 789 2008-07-30 15:41:21Z toki $'
|
155
155
|
|
156
156
|
def open_for_read(filename)
|
157
157
|
File.open(filename, 'rb')
|
@@ -262,10 +262,10 @@ module Higgs::Test
|
|
262
262
|
|
263
263
|
class TarArchiveReaderSyscallTest < TarArchiveReaderTest
|
264
264
|
# for ident(1)
|
265
|
-
CVS_ID = '$Id: test_tar.rb
|
265
|
+
CVS_ID = '$Id: test_tar.rb 789 2008-07-30 15:41:21Z toki $'
|
266
266
|
|
267
267
|
def open_for_read(filename)
|
268
|
-
RawIO.
|
268
|
+
RawIO.open(filename, 'rb')
|
269
269
|
end
|
270
270
|
end
|
271
271
|
|
@@ -274,7 +274,7 @@ module Higgs::Test
|
|
274
274
|
include Higgs::Tar::Block
|
275
275
|
|
276
276
|
# for ident(1)
|
277
|
-
CVS_ID = '$Id: test_tar.rb
|
277
|
+
CVS_ID = '$Id: test_tar.rb 789 2008-07-30 15:41:21Z toki $'
|
278
278
|
|
279
279
|
def open_for_write(filename)
|
280
280
|
File.open(filename, 'wb')
|
@@ -344,10 +344,10 @@ module Higgs::Test
|
|
344
344
|
|
345
345
|
class TarArchiveWriterSyscallTest < TarArchiveWriterTest
|
346
346
|
# for ident(1)
|
347
|
-
CVS_ID = '$Id: test_tar.rb
|
347
|
+
CVS_ID = '$Id: test_tar.rb 789 2008-07-30 15:41:21Z toki $'
|
348
348
|
|
349
349
|
def open_for_write(filename)
|
350
|
-
RawIO.
|
350
|
+
RawIO.open(filename, 'wb')
|
351
351
|
end
|
352
352
|
end
|
353
353
|
|
@@ -356,7 +356,7 @@ module Higgs::Test
|
|
356
356
|
include Higgs::Tar::Block
|
357
357
|
|
358
358
|
# for ident(1)
|
359
|
-
CVS_ID = '$Id: test_tar.rb
|
359
|
+
CVS_ID = '$Id: test_tar.rb 789 2008-07-30 15:41:21Z toki $'
|
360
360
|
|
361
361
|
def setup
|
362
362
|
@output = File.open('foo.tar', 'wb')
|
data/test/test_thread.rb
CHANGED
@@ -27,7 +27,7 @@ module Higgs::Test
|
|
27
27
|
include Timeout
|
28
28
|
|
29
29
|
# for ident(1)
|
30
|
-
CVS_ID = '$Id: test_thread.rb
|
30
|
+
CVS_ID = '$Id: test_thread.rb 752 2008-01-23 16:46:25Z toki $'
|
31
31
|
|
32
32
|
def test_start_wait
|
33
33
|
latch = Latch.new
|
@@ -61,7 +61,7 @@ module Higgs::Test
|
|
61
61
|
include Timeout
|
62
62
|
|
63
63
|
# for ident(1)
|
64
|
-
CVS_ID = '$Id: test_thread.rb
|
64
|
+
CVS_ID = '$Id: test_thread.rb 752 2008-01-23 16:46:25Z toki $'
|
65
65
|
|
66
66
|
def test_count_down_wait
|
67
67
|
latch = CountDownLatch.new(3)
|
@@ -103,7 +103,7 @@ module Higgs::Test
|
|
103
103
|
include Timeout
|
104
104
|
|
105
105
|
# for ident(1)
|
106
|
-
CVS_ID = '$Id: test_thread.rb
|
106
|
+
CVS_ID = '$Id: test_thread.rb 752 2008-01-23 16:46:25Z toki $'
|
107
107
|
|
108
108
|
def test_wait
|
109
109
|
barrier = Barrier.new(COUNT_OF_THREADS)
|
@@ -147,7 +147,7 @@ module Higgs::Test
|
|
147
147
|
include Timeout
|
148
148
|
|
149
149
|
# for ident(1)
|
150
|
-
CVS_ID = '$Id: test_thread.rb
|
150
|
+
CVS_ID = '$Id: test_thread.rb 752 2008-01-23 16:46:25Z toki $'
|
151
151
|
|
152
152
|
def calc
|
153
153
|
@s = 0 # @s's scope is over multi-threading
|
@@ -325,7 +325,7 @@ module Higgs::Test
|
|
325
325
|
include ThreadParams
|
326
326
|
|
327
327
|
# for ident(1)
|
328
|
-
CVS_ID = '$Id: test_thread.rb
|
328
|
+
CVS_ID = '$Id: test_thread.rb 752 2008-01-23 16:46:25Z toki $'
|
329
329
|
|
330
330
|
def setup
|
331
331
|
@rw_lock = ReadWriteLock.new
|
@@ -509,7 +509,7 @@ module Higgs::Test
|
|
509
509
|
include ThreadParams
|
510
510
|
|
511
511
|
# for ident(1)
|
512
|
-
CVS_ID = '$Id: test_thread.rb
|
512
|
+
CVS_ID = '$Id: test_thread.rb 752 2008-01-23 16:46:25Z toki $'
|
513
513
|
|
514
514
|
class Counter
|
515
515
|
def initialize
|
data/test/test_tman.rb
CHANGED
@@ -15,19 +15,19 @@ module Higgs::Test
|
|
15
15
|
include Higgs
|
16
16
|
|
17
17
|
# for ident(1)
|
18
|
-
CVS_ID = '$Id: test_tman.rb
|
18
|
+
CVS_ID = '$Id: test_tman.rb 1609 2009-05-09 11:39:26Z toki $'
|
19
19
|
|
20
20
|
def setup
|
21
21
|
@test_dir = 'st_test'
|
22
22
|
FileUtils.rm_rf(@test_dir) # for debug
|
23
23
|
FileUtils.mkdir_p(@test_dir)
|
24
|
-
@
|
24
|
+
@st_name = File.join(@test_dir, 'foo')
|
25
25
|
@logger = proc{|path|
|
26
26
|
logger = Logger.new(path, 1)
|
27
27
|
logger.level = Logger::DEBUG
|
28
28
|
logger
|
29
29
|
}
|
30
|
-
@st = Storage.new(@
|
30
|
+
@st = Storage.new(@st_name, :logger => @logger)
|
31
31
|
@tman = TransactionManager.new(@st)
|
32
32
|
end
|
33
33
|
|
@@ -1088,7 +1088,7 @@ module Higgs::Test
|
|
1088
1088
|
|
1089
1089
|
class TransactionManagerTest_with_SecondaryCache < TransactionManagerTest
|
1090
1090
|
# for ident(1)
|
1091
|
-
CVS_ID = '$Id: test_tman.rb
|
1091
|
+
CVS_ID = '$Id: test_tman.rb 1609 2009-05-09 11:39:26Z toki $'
|
1092
1092
|
|
1093
1093
|
def setup
|
1094
1094
|
super
|
data/test/test_tman_init_opts.rb
CHANGED
@@ -7,7 +7,7 @@ require 'yaml'
|
|
7
7
|
module Higgs::Test
|
8
8
|
class TransactionManagerInitOptionsTest < Test::Unit::TestCase
|
9
9
|
# for ident(1)
|
10
|
-
CVS_ID = '$Id: test_tman_init_opts.rb
|
10
|
+
CVS_ID = '$Id: test_tman_init_opts.rb 561 2007-09-25 15:20:20Z toki $'
|
11
11
|
|
12
12
|
include Higgs::TransactionManager::InitOptions
|
13
13
|
|
data/test/test_tman_mvcc.rb
CHANGED
@@ -26,13 +26,13 @@ module Higgs::Test
|
|
26
26
|
@test_dir = 'st_test'
|
27
27
|
FileUtils.rm_rf(@test_dir) # for debug
|
28
28
|
FileUtils.mkdir_p(@test_dir)
|
29
|
-
@
|
29
|
+
@st_name = File.join(@test_dir, 'foo')
|
30
30
|
@logger = proc{|path|
|
31
31
|
logger = Logger.new(path, 1)
|
32
32
|
logger.level = Logger::DEBUG
|
33
33
|
logger
|
34
34
|
}
|
35
|
-
@st = Storage.new(@
|
35
|
+
@st = Storage.new(@st_name, :logger => @logger)
|
36
36
|
@tman = TransactionManager.new(@st, :lock_manager => create_lock_manager)
|
37
37
|
end
|
38
38
|
|
data/test/test_utils_bman.rb
CHANGED
@@ -15,7 +15,7 @@ module Higgs::Test
|
|
15
15
|
include Higgs
|
16
16
|
|
17
17
|
# for ident(1)
|
18
|
-
CVS_ID = '$Id: test_utils_bman.rb
|
18
|
+
CVS_ID = '$Id: test_utils_bman.rb 770 2008-02-13 11:26:09Z toki $'
|
19
19
|
|
20
20
|
STORAGE_ITEMS = (ENV['STORAGE_ITEMS'] || '100').to_i
|
21
21
|
WARM_START_ITEMS = (ENV['WARM_START_ITEMS'] || '1000').to_i
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: higgs
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date:
|
6
|
+
version: 0.1.7
|
7
|
+
date: 2009-05-12 00:00:00 +09:00
|
8
8
|
summary: pure ruby transactional storage compatible with unix TAR format
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -31,6 +31,7 @@ authors:
|
|
31
31
|
files:
|
32
32
|
- lib/cgi/session/higgs.rb
|
33
33
|
- lib/higgs/jlog.rb
|
34
|
+
- lib/higgs/jcompat.rb
|
34
35
|
- lib/higgs/utils/bman.rb
|
35
36
|
- lib/higgs/exceptions.rb
|
36
37
|
- lib/higgs/cache.rb
|
@@ -91,14 +92,15 @@ files:
|
|
91
92
|
- test/test_jlog.rb
|
92
93
|
- test/test_online_backup.rb
|
93
94
|
- ChangeLog
|
94
|
-
- LICENSE
|
95
95
|
- README
|
96
|
+
- Rakefile
|
97
|
+
- lib/LICENSE
|
98
|
+
- mkrdoc.rb
|
99
|
+
- rdoc.yml
|
96
100
|
test_files:
|
97
101
|
- test/run.rb
|
98
102
|
rdoc_options:
|
99
103
|
- -SNa
|
100
|
-
- -i
|
101
|
-
- .
|
102
104
|
- -m
|
103
105
|
- Higgs
|
104
106
|
extra_rdoc_files: []
|