Bug #3586
closed[API] Job "priority" field defaults to "null", should default to "0"
100%
Description
The "priority" field is used to sort the job queue, and it defaults to null. Unfortunately, the database automatically puts "null" values first in the sorting order, preventing priority from working as intended. The API server should assign a default numeric priority of 0 when creating the model and a NOT NULL constraint should be added to the schema.
Updated by Peter Amstutz over 10 years ago
- Subject changed from Job "priority" field defaults to "null", should default to "0" to [API] Job "priority" field defaults to "null", should default to "0"
- Description updated (diff)
- Category set to API
Updated by Peter Amstutz over 10 years ago
- Target version deleted (
2014-08-27 Sprint)
Updated by Tom Clegg over 10 years ago
- Target version set to Arvados Future Sprints
Updated by Ward Vandewege over 10 years ago
- Target version changed from Arvados Future Sprints to 2014-09-17 sprint
Updated by Peter Amstutz over 10 years ago
- Status changed from New to In Progress
Updated by Tom Clegg over 10 years ago
This index seems to have been removed from structure.sql in 80cbf4d9, not sure why/how:
-- Name: pipeline_instance_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX pipeline_instance_owner_uuid_name_unique ON pipeline_instances USING btree (owner_uuid, name); --
It comes back automatically if I do rake db:migrate.
Other than that, LGTM. Thanks.
Updated by Tom Clegg over 10 years ago
Ah, I get it (I think): the jobs_owner_uuid_name_unique and pipeline_instance_owner_uuid_name_unique indices stayed in db/structure.sql in the 3036 merge, even though they had been removed from the migration.
I've fixed my own database, so now it agrees with the migrations instead of agreeing with db/structure.sql. Now we just have to remove those two db/structure.sql entries so it agrees with the migrations. (Perhaps best to do it in a separate commit with refs #3036?)
Updated by Peter Amstutz over 10 years ago
- Status changed from In Progress to Resolved