Rework and expand the algorithms in JSCAN, part 5/?.
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 7 Sep 2005 07:20:23 +0000 (07:20 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 7 Sep 2005 07:20:23 +0000 (07:20 +0000)
commita9cb38893082c3a55facefa906b1bb4ad8a52b5d
treeb6016df31b962b592adfe52e0b3d84e372e58ea1
parent4a8a4da2ec1b159ddcd0d171ae7e22209b733876
Rework and expand the algorithms in JSCAN, part 5/?.

Revamp the scanning code, cleaning up the API considerably and allowing
forward or backwards reads relative to a supplied record, which makes
scanning a lot more intuitive.

Implement the -c option to specify the number of raw records to process.
This is primarily intended for running a mirror forwards or backwards by
a certain number of records.

Implement mid-transaction recovery.  Mid-transaction recovery is needed
when a batch operation has stopped at a raw record that is in the middle
of a meta-transaction (a meta-transaction can consist of many raw records).
Stoppage can occur for many reasons, such as the batch being run while
the system is still writing out the records related to a meta-transaction,
or due to journal restarts, unexpected program termination, or command-line
limited record counts with -c.

This feature has been tested a little with -m -c 1 to iterate a mirror
forwards in time one raw record at a time across a large WRITE transaction
that covers many raw records.  It is a pre-requisite for being able to
iterate mirrors forwards and backwards in time.
sbin/jscan/jfile.c
sbin/jscan/jscan.c
sbin/jscan/jscan.h
sbin/jscan/jsession.c
sbin/jscan/jstream.c