-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get task info by runId #813
Conversation
@@ -29,6 +29,9 @@ | |||
@SqlQuery("SELECT bytes FROM taskHistory WHERE taskId = :taskId") | |||
byte[] getTaskHistoryForTask(@Bind("taskId") String taskId); | |||
|
|||
@SqlQuery("SELECT bytes FROM taskHistory WHERE runId = :runId") | |||
byte[] getTaskHistoryForTaskByRunId(@Bind("runId") String runId); |
There was a problem hiding this comment.
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?
@@ -29,6 +29,9 @@ | |||
@SqlQuery("SELECT bytes FROM taskHistory WHERE taskId = :taskId") | |||
byte[] getTaskHistoryForTask(@Bind("taskId") String taskId); | |||
|
|||
@SqlQuery("SELECT bytes FROM taskHistory WHERE requestId = :requestId AND runId = :runId") | |||
byte[] getTaskHistoryForTaskByRunId(@Bind("requestId") String requestId, @Bind("runId") String runId); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Updated a couple things, had forgotten about the description, thanks for that |
This PR reads like there was an assumption that |
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