Commit Graph

17 Commits

Author SHA1 Message Date
Braydon Fuller
a3a34dbfe6
test: remove test assert util and use bsert 2019-06-05 12:11:57 -07:00
Nodar Chkuaselidze
1fceb14e32
blockstore-test: use try/catch instead of promise.catch/finally.
finally was introduce in node v10, so this test will fail on v8.6.0 node.
2019-05-18 16:36:38 +04:00
Braydon Fuller
54383578fb
test: configurable and unique test directory path
- Multiple parallel runs of the same test will not conflict
  as a unique identifier is added to the test directory.
- The base test directory can be configured for various
  environments, and can be changed via the environment
  variable `TEMP`, see the implementation of `os.tmpdir()`
  for specific details.
2019-04-11 10:15:51 -07:00
Braydon Fuller
50fe51ca32
blockstore: close file if write or read throws 2019-04-08 13:26:16 -07:00
Braydon Fuller
83824d73b1
blockstore: optimize block read and index
There is potential for around a 10% to 23% increase to the performance
of block reads by using `allocUnsafe`, however there is already around
a 3 to 6 times increase to the performance. While it's safe to use
`allocUnsafe` as the number of bytes read is checked to be the same
size as the buffer allocation, there is a potential for test cases
to introduce _other_ behavior for `fs.read` that may not have the
same behavior, though this isn't currently the case.
2019-04-08 13:20:00 -07:00
Braydon Fuller
f3e517c3c0
blockstore: fix logger, improve messages 2019-04-08 13:18:58 -07:00
Braydon Fuller
961f6eddb5
blockstore: index undo blocks from files 2019-04-08 13:18:57 -07:00
Braydon Fuller
8fc605c4a9
blockstore: index after write interrupt and use less memory 2019-04-08 13:18:57 -07:00
Braydon Fuller
5cbbcf5409
blockstore: do not write block twice 2019-04-08 13:18:57 -07:00
Braydon Fuller
58e623e30a
test: minor, cleanup and clarity 2019-04-08 13:18:56 -07:00
Braydon Fuller
747a8e707b
blockstore: tests and fixes for blockstore error cases 2019-04-08 13:18:56 -07:00
Braydon Fuller
0f0cb00c54
blockstore: minor, spelling 2019-04-08 13:18:56 -07:00
Braydon Fuller
89d3253f29
blockstore: add ensure method to create directories 2019-04-08 13:18:54 -07:00
Braydon Fuller
3cec13ef5e
blockstore: add block data types with an undo type 2019-04-08 13:18:53 -07:00
Braydon Fuller
abd2ae4b5d
blockstore: prevent blocks writes at the same position 2019-04-08 13:18:53 -07:00
Braydon Fuller
2d08b296f7
blockstore: recover from block write interrupt 2019-04-08 13:18:52 -07:00
Braydon Fuller
8435a116f1
blockstore: add file block storage 2019-04-08 13:18:47 -07:00