Skip to content

Commit

Permalink
sql: fix assignment of dropped table job status
Browse files Browse the repository at this point in the history
We were mistakenly mutating a copy of a slice element in a loop while updating
the status for a job for a table drop, causing an incorrect job status to be
reported.

Release note (bug fix): A bug was fixed that caused jobs for dropping tables to
report an inaccurate status.
  • Loading branch information
lucy-zhang committed Nov 1, 2019
1 parent c669035 commit 11ee81a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sql/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,8 @@ func (p *planner) createDropTablesJob(
if !drainNames {
detailStatus = jobspb.Status_WAIT_FOR_GC_INTERVAL
}
for _, droppedDetail := range droppedDetails {
droppedDetail.Status = detailStatus
for i := range droppedDetails {
droppedDetails[i].Status = detailStatus
}

runningStatus := RunningStatusDrainingNames
Expand Down

0 comments on commit 11ee81a

Please sign in to comment.