Skip to content

backupccl: fix nil pointer exception in restore OnFailOrCancel#78940

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
adityamaru:fix-npe-onfailorcancel
Mar 29, 2022
Merged

backupccl: fix nil pointer exception in restore OnFailOrCancel#78940
craig[bot] merged 1 commit intocockroachdb:masterfrom
adityamaru:fix-npe-onfailorcancel

Conversation

@adityamaru
Copy link
Copy Markdown
Contributor

The execCfg field on the restore resumer was not being set correctly
in the OnFailOrCancel hook. This would lead to a nil pointer exception
during cleanup.

Other jobs such as import, backup use the execCfg directly off the
JobExecContext instead of storing it on the resumer. An alternative to
this fix could be to change all r.ExecCfg to use the execCfg on the JobExecContext.

Fixes: #76720

Release note (bug fix): Fixes a nil pointer exception during the
cleanup of a failed or cancelled restore job.

@adityamaru adityamaru requested review from a team and dt March 29, 2022 09:58
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@adityamaru adityamaru requested review from stevendanna and removed request for a team March 29, 2022 09:59
The execCfg field on the restore resumer was not being set correctly
in the OnFailOrCancel hook. This would lead to a nil pointer exception
during cleanup.

Other jobs such as import, backup use the execCfg directly off the
JobExecContext instead of storing it on the resumer. An alternative to
this fix could be to change all `r.ExecCfg` to use the execCfg on the JobExecContext.

Fixes: cockroachdb#76720

Release note (bug fix): Fixes a nil pointer exception during the
cleanup of a failed or cancelled restore job.
@adityamaru adityamaru force-pushed the fix-npe-onfailorcancel branch from 1614376 to f9c3d13 Compare March 29, 2022 15:06
@adityamaru
Copy link
Copy Markdown
Contributor Author

TestDropColumnAfterMutations unrelated flake, schema is aware.

@adityamaru
Copy link
Copy Markdown
Contributor Author

TFTRs!

bors r=dt,stevendanna

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 29, 2022

Build succeeded:

@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Mar 29, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from f9c3d13 to blathers/backport-release-21.2-78940: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 21.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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.

backupccl: v21.2.4-customer: nil pointer in restoreResumer.cleanupTempSystemTables

4 participants