Skip to content

Get task info by runId#813

Merged
tpetr merged 7 commits into
masterfrom
run_id_query
Dec 29, 2015
Merged

Get task info by runId#813
tpetr merged 7 commits into
masterfrom
run_id_query

Conversation

@ssalinas
Copy link
Copy Markdown
Contributor

Get the SingularityTaskIdHistory object for a task by it's run id

/cc @jhaber this should get you back taskId, last state, and the SingularityTaskId object

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this also filter by requestId?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we index on runId?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not currently, we would probably need to for this case

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, we should add an index. let me know if you need a hand with this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an index in b63cf47 , can someone with more mysql chops double check that please?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syncing up w/ monty about this

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which query/queries will benefit from the added index in b63cf47?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one on the line for this comment thread:
SELECT bytes FROM taskHistory WHERE requestId = :requestId AND runId = :runId

@ssalinas
Copy link
Copy Markdown
Contributor Author

Updated a couple things, had forgotten about the description, thanks for that

@tpetr
Copy link
Copy Markdown
Contributor

tpetr commented Dec 21, 2015

This PR reads like there was an assumption that runId would be unique, but I don't see any constraint for that in #669. Did I miss something, or was this an oversight?

@tpetr tpetr added this to the 0.4.8 milestone Dec 28, 2015
tpetr pushed a commit that referenced this pull request Dec 29, 2015
@tpetr tpetr merged commit 9634c33 into master Dec 29, 2015
@tpetr tpetr removed hs_qa labels Dec 29, 2015
@ssalinas ssalinas deleted the run_id_query branch February 9, 2016 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants