Skip to content
Snippets Groups Projects
Commit 6c89bc44 authored by Leo Gordon's avatar Leo Gordon
Browse files

the schema did not allow more than one job_message per second from one...

the schema did not allow more than one job_message per second from one attempt. This limitation has been removed
parent 00a2bbd1
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ CREATE TABLE IF NOT EXISTS meta (
CREATE TABLE IF NOT EXISTS analysis (
analysis_id int(10) unsigned NOT NULL auto_increment, # unique internal id
analysis_id int(10) unsigned NOT NULL AUTO_INCREMENT, # unique internal id
created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
logic_name VARCHAR(40) NOT NULL,
db VARCHAR(120),
......@@ -105,7 +105,7 @@ CREATE TABLE IF NOT EXISTS analysis_description (
--
CREATE TABLE worker (
worker_id int(10) unsigned NOT NULL auto_increment,
worker_id int(10) unsigned NOT NULL AUTO_INCREMENT,
analysis_id int(10) unsigned NOT NULL,
meadow_type enum('LSF', 'LOCAL') NOT NULL,
host varchar(40) DEFAULT NULL,
......@@ -151,7 +151,7 @@ CREATE TABLE worker (
-- input_id_template - a template for generating a new input_id (not necessarily a hashref) in this dataflow; if undefined is kept original
CREATE TABLE dataflow_rule (
dataflow_rule_id int(10) unsigned NOT NULL auto_increment,
dataflow_rule_id int(10) unsigned NOT NULL AUTO_INCREMENT,
from_analysis_id int(10) unsigned NOT NULL,
to_analysis_url varchar(255) default '' NOT NULL,
branch_code int(10) default 1 NOT NULL,
......@@ -217,7 +217,7 @@ CREATE TABLE analysis_ctrl_rule (
-- Default=NULL means "I'm not blocking anything by default".
CREATE TABLE job (
job_id int(10) NOT NULL auto_increment,
job_id int(10) NOT NULL AUTO_INCREMENT,
prev_job_id int(10) DEFAULT NULL, # the job that created this one using a dataflow rule
analysis_id int(10) unsigned NOT NULL,
input_id char(255) NOT NULL,
......@@ -248,7 +248,8 @@ CREATE TABLE job (
-- It may or may not indicate that the job was unsuccessful via is_error flag.
--
-- semantics:
-- job_id - the id of the job that threw the message
-- job_message_id - an autoincremented primary id of the message
-- job_id - the id of the job that threw the message
-- worker_id - the worker in charge of the job at the moment
-- time - when the message was thrown
-- retry - retry_count of the job when the message was thrown
......@@ -257,6 +258,7 @@ CREATE TABLE job (
-- is_error - binary flag
CREATE TABLE job_message (
job_message_id int(10) NOT NULL AUTO_INCREMENT,
job_id int(10) NOT NULL,
worker_id int(10) unsigned NOT NULL,
time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
......@@ -265,7 +267,7 @@ CREATE TABLE job_message (
msg text,
is_error boolean,
PRIMARY KEY (job_id, worker_id, time),
PRIMARY KEY (job_message_id),
INDEX worker_id (worker_id),
INDEX job_id (job_id)
......@@ -316,7 +318,7 @@ CREATE TABLE job_file (
-- data - text blob which holds the data
CREATE TABLE analysis_data (
analysis_data_id int(10) NOT NULL auto_increment,
analysis_data_id int(10) NOT NULL AUTO_INCREMENT,
data longtext,
PRIMARY KEY (analysis_data_id),
......
......@@ -227,7 +227,8 @@ CREATE INDEX IF NOT EXISTS worker_idx ON job (worker_id);
-- It may or may not indicate that the job was unsuccessful via is_error flag.
--
-- semantics:
-- job_id - the id of the job that threw the message
-- job_message_id - an autoincremented primary id of the message
-- job_id - the id of the job that threw the message
-- worker_id - the worker in charge of the job at the moment
-- time - when the message was thrown
-- retry - retry_count of the job when the message was thrown
......@@ -236,15 +237,14 @@ CREATE INDEX IF NOT EXISTS worker_idx ON job (worker_id);
-- is_error - binary flag
CREATE TABLE job_message (
job_message_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
job_id INTEGER NOT NULL,
worker_id INTEGER NOT NULL,
time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
retry int(10) DEFAULT 0 NOT NULL,
status TEXT DEFAULT 'UNKNOWN', /* enum('UNKNOWN', 'COMPILATION', 'GET_INPUT', 'RUN', 'WRITE_OUTPUT', 'PASSED_ON') DEFAULT 'UNKNOWN', */
msg TEXT,
is_error BOOLEAN,
PRIMARY KEY (job_id, worker_id, time)
is_error BOOLEAN
);
CREATE INDEX IF NOT EXISTS worker_idx ON job_message (worker_id);
CREATE INDEX IF NOT EXISTS job_idx ON job_message (job_id);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment