kbase / execution_engine2

KBase Execution Engine
http://www.kbase.us/services/ee2
MIT License
0 stars 7 forks source link

DATAUP-461 Refactor Retry #397

Closed bio-boris closed 3 years ago

bio-boris commented 3 years ago

Description of PR purpose/changes

Summary: In order to ensure DB consistency, we need to rework the retry mechanism

Remove retry_count field from record
Add retry_ids field to record
Change check_job/check_jobs to return “retry_count” in addition to “retry_ids”
Change retry to return “retry_ids”
Add a toggle field to ensure database is consistent in terms of updating the parent_retry and parent_job_id  

Testing Instructions

db.getCollection('ee2_jobs').update({'retry_count' : { $exists: true }}, { $set: {"retry_ids": [] }}, {upsert:false,
                          multi:true})  

db.getCollection('ee2_jobs').update({'retry_count' : { $exists: true }}, { $unset: {"retry_count" : ""}}, {upsert:false,
                          multi:true})  

db.getCollection('ee2_jobs').find({'retry_count' : { $exists: true }})

Dev Checklist:

Updating Version and Release Notes (if applicable)