• Antelope Release 5.5 Linux 2.6.32-220.el6.x86_64 2015-04-21

 

NAME

rewind_queue - reset ProcessingQueue to retrieve orphans

SYNOPSIS

rewind_queue queuefile

SUPPORT


Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.

FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.

DESCRIPTION

This program is a necessary evil for programs using the ProcessingQueue object (http://geology.indiana.edu/pavlis/software/seispp/html/d9/ddd/classSEISPP_1_1DatascopeProcessingQueue.html) to handle database driven processing. This is used, for example, in dbxcor when it is run in source array mode. This program does two things. First, it resets the queue pointer to the first record in the database view to which the queue file is linked. Second, the ProcessingQueue uses a file that marks database rows as finished, skipped, being processed, or unfinished. When a program crashes it will likely leave a record marked as being actively processed, which causes a restart to skip that record leaving data associated with that database record an orphan. To avoid this this program clears all entries marked as in progress and sets them to be reprocessed. Users should recognize that the next run of a program using that queue will have to handle the overhead of a linear search through the queue to look for orphans. The overhead, however, is tiny and the more important thing to recognize is the next run will pick up the orphans. Be warned, however, that if the calling program crashed on this record before it likely will again unless something was fixed.

FILES

The queue file this program hits is a frozen binary format linked to the ProcessingQueue object AND a particular database view. It is a file of binary int number and it's contents are easily viewed with the unix od with -t set to print host int values. The first three int values in the file are a header with the following attributes in the following order: total_record_count, datascope table number linked to this view, and the currrent high water mark. This is followed by a vector of ints total_record_count long of processing status values. If you inspect this file this way after running this program you will see that the current record counter is set to 0.

SEE ALSO

http://geology.indiana.edu/pavlis/software/seispp/html/d9/ddd/classSEISPP_1_1DatascopeProcessingQueue.html

BUGS AND CAVEATS

This program really should have a more elaborate edit mode that would allow a subset condition to selectively mark queue entries for reprocessing. Currently there is no way to reprocess a specific row in a view handled by a ProcessingQueue. This can be a big problem if working from a queue with days of work linked to it.

AUTHOR

Gary L. Pavlis
Indiana University
pavlis@indiana.edu

Antelope User Group Contributed Software
Printer icon