dCache/dcache — pull request #127 by alrossi (2013-07-10 13:01:38+00:00)
Title: (skel): time-unit corrections to billing migration scripts

The scripts contained in skel/share/migration which are intended to aid in migrating preexisting aggregated billing data or in aggregating the data from the main fine-grained tables have two errors in them.

1. migrate_from_preexistent.sql does not account for the time-unit differences between the original dc_tm_daily tables, which store the data in seconds, and the new tables, which preserve the millisecond unit of the base tab$

2. migrate_from_messageinfo.sql neglected to exclude data from failed operations (errorcode = 0).

This patch repairs these two issues.

Testing	done:

Before the patches, stored and displayed data did not correspond with previous installations, nor did the two scripts produce similar results. After the patch, the results of both migrations are consonant with prior data.

Target: master@ded9bf4766c55e3a2f81f8dc25641a5921030c4c
Request: 2.6
Request: 2.2
Patch: http://rb.dcache.org/r/5732/
Require-book: no
Require-notes: yes
Acked-by: Gerd

RELEASE NOTES:

Fixes two bugs in the migration scripts. One which neglected to convert from seconds to milliseconds (migrate_from_preexistent.sql) for connection time values, the other which neglected to exclude data from failed operations$

Note for those who already have applied the faulty script: the migration from the preexistent tables does not really affect anyone outside of Fermi. The other migration error generates differences which are probably negligib$