Add an 'error_msg' table to the schema

Bug #812698 reported by Muharem Hrnjadovic
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
Medium
Lars Butler

Bug Description

It needs a foreign key to an 'oq_job' row and a brief and detailed VARCHAR column respectively.

Changed in openquake:
status: New → Confirmed
tags: added: database job-supervision
Changed in openquake:
milestone: none → 0.4.2
importance: Undecided → Medium
Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :

Also, add a 'supervisor_pid' column to the 'oq_job' table.

John Tarter (toh2)
Changed in openquake:
milestone: 0.4.2 → 0.4.3
Changed in openquake:
assignee: nobody → Lars Butler (lars-butler)
Changed in openquake:
status: Confirmed → In Progress
Revision history for this message
Lars Butler (lars-butler) wrote :

I'm thinking of implementing this table as 'log_msg', rather than just 'error_msg'. Not all log messages are 'errors' and we may want to capture more info than just errors. Thoughts?

Revision history for this message
Gabriele Favalessa (favalex) wrote :

If this table is intended to store log messages (fact that is not clear to me from the bug description) maybe a timestamp and a level are also appropriate.

Revision history for this message
Lars Butler (lars-butler) wrote :

Good idea. I believe this table is intended as persistent log storage. Even if we were just capturing errors (and not 'info' level messages), I think it is appropriate anyway to capture the level and timestamp.

Revision history for this message
Lars Butler (lars-butler) wrote :

Since the job supervisor hasn't acutally been built yet, I'm going to add the 'supervisor_pid' requirement [1] to the 'Implement job supervisor' bug [2].

[1] https://bugs.launchpad.net/openquake/+bug/812698/comments/1
[2] https://bugs.launchpad.net/openquake/+bug/825325

Revision history for this message
Anton Gritsay (angri) wrote :

I wouldn't store all log messages in the DB, especially in RDB. Why not make it simpler and just add "error_msg" column to jobs table?

Revision history for this message
Lars Butler (lars-butler) wrote :

Why wouldn't you store them in an RDB?

We want to store multiple messages per job; 1 error message per job record does not satisfy our requirements.

Revision history for this message
Anton Gritsay (angri) wrote :

> Why wouldn't you store them in an RDB?

Doesn't storing all log records in database mean cluttering it unnecessarily?

> We want to store multiple messages per job; 1 error message per job record does not satisfy our requirements.

If all we really need to store is the message why job was not able to complete ("error_msg") it could be only one per job, isn't it?

Revision history for this message
Lars Butler (lars-butler) wrote :

> Doesn't storing all log records in database mean cluttering it unnecessarily?

No. Not if you want to be able to access your log messages easily and mine them for information (and we do).

> If all we really need to store is the message why job was not able to complete ("error_msg") it could be only one per job, isn't it?

There can be multiple errors for a job. For instance, two or more worker nodes could report errors before the system has a chance to halt the job. We want to know about those errors (not just one).

Revision history for this message
Lars Butler (lars-butler) wrote :

Okay, so I completely misunderstood the purpose of this bug.

The 'error_msg' table will be used to store a single message which details why a job failed. This will displayed to user in the case of a failure. The user will initially see the 'brief' error, and if they wish they can view the 'detailed' error for the full message.

Revision history for this message
Lars Butler (lars-butler) wrote :
Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote : Re: [Bug 812698] Re: Add an 'error_msg' table to the schema

On 08/16/2011 04:26 PM, Lars Butler wrote:
> Okay, so I completely misunderstood the purpose of this bug.
>
> The 'error_msg' table will be used to store a single message which
> details why a job failed. This will displayed to user in the case of a
> failure. The user will initially see the 'brief' error, and if they wish
> they can view the 'detailed' error for the full message.
A single error message might be a bit restrictive. I guess the job
supervisor would want to store the first N of the error messages it gets
to see.
What might be a good choice for N? I don't know .. maybe it is N=1 after
all.

Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.