Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent ingestion of jobs with 0 start or end time #197

Merged
merged 2 commits into from
Aug 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion classes/OpenXdmod/Ingestor/Shredded/Jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ public function __construct($dest_db, $src_db)
timelimit,
node_list
FROM shredded_job
WHERE start_time > 0
AND end_time > 0
';

$sql = 'SELECT MAX(id) AS max_id FROM staging_job';
list($row) = $dest_db->query($sql);
if ($row['max_id'] != null) {
$src_query .= 'WHERE shredded_job_id > ' . $row['max_id'];
$src_query .= 'AND shredded_job_id > ' . $row['max_id'];
}

parent::__construct(
Expand Down
20 changes: 20 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,23 @@ will create the databases. You may also use the less safe
[mysql-binary-log]: https://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html
[mysql-grant]: https://dev.mysql.com/doc/refman/5.5/en/grant.html
[log_bin_trust_function_creators]: https://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html#option_mysqld_log-bin-trust-function-creators

### Why do I see the error message "Failed to correct job times" during the shredding process?

Resource manager account log records may be missing some job data under certain
circumstances. It is expected that a job record will have a start time, end
time and wall time. If one of these is missing it will be calculated using the
other two. If two or more are missing the error message in question will be
displayed along with the values that were present in the job record. In
addition to this error message a file will be produced at the end of the
shredding process containing the job record that produced the error along with
additional details. Look for the log message "Job errors written to ...".

One example of a situation that will produce this error is that some resource
managers record a 0 start time in their accounting logs when a job is canceled
before the job started. It is also possible that other errors occurred to
produce these values so they are not ignored and this error message is produced.
As of Open XDMoD 7.0 any job with a start or end time equal to 0 will not be
ingested into the data warehouse and will not contribute to the job count or
any other metrics. Previous versions of Open XDMoD did include these jobs
which resulted in inaccurate results.