Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

loader/syncer: filter context cancel error while executing sqls (#355) #382

Conversation

lichunzhu
Copy link
Contributor

@lichunzhu lichunzhu commented Nov 28, 2019

cherry-pick #355 and #381 to release-1.0


What problem does this PR solve?

When an error occurs and the context in loader/syncer is canceled, the normally running sql will be canceled and return a context.Canceled error, which will confuse the users.

What is changed and how it works?

Filter all the context.Canceled in loader/syncer. Don't return error and don't print log.

Check List

Tests

  • Unit test
  • Integration test

Related changes

  • Need to cherry-pick to the release branch

@lichunzhu lichunzhu added priority/normal Minor change, requires approval from ≥1 primary reviewer status/PTAL This PR is ready for review. Add this label back after committing new changes type/cherry-pick This PR is just a cherry-pick (backport) labels Nov 28, 2019
@lichunzhu lichunzhu added status/DNM Do not merge, test is failing or blocked by another PR and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Nov 28, 2019
@lichunzhu lichunzhu changed the title add ErrorFilterContextCanceled filter context cancel error loader/syncer: filter context cancel error while executing sqls (#355) Nov 28, 2019
@csuzhangxc
Copy link
Member

/run-all-tests tidb=release-3.0

Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added the status/LGT1 One reviewer already commented LGTM label Nov 29, 2019
@codecov
Copy link

codecov bot commented Nov 29, 2019

Codecov Report

Merging #382 into release-1.0 will decrease coverage by 0.1484%.
The diff coverage is 44.8275%.

@@                 Coverage Diff                 @@
##           release-1.0       #382        +/-   ##
===================================================
- Coverage      57.3099%   57.1614%   -0.1485%     
===================================================
  Files              158        159         +1     
  Lines            16074      16135        +61     
===================================================
+ Hits              9212       9223        +11     
- Misses            5956       6007        +51     
+ Partials           906        905         -1

@csuzhangxc
Copy link
Member

@WangXiangUSTC PTAL

Copy link
Contributor

@WangXiangUSTC WangXiangUSTC left a comment

Choose a reason for hiding this comment

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

LGTM

@WangXiangUSTC WangXiangUSTC added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Nov 29, 2019
@csuzhangxc csuzhangxc merged commit 60a2688 into pingcap:release-1.0 Nov 29, 2019
@csuzhangxc csuzhangxc removed the status/DNM Do not merge, test is failing or blocked by another PR label Nov 29, 2019
@lichunzhu lichunzhu deleted the czli/release1.0/filterContextCancelError branch November 29, 2019 11:17
@ericsyh ericsyh added this to the v1.0.3 milestone Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority/normal Minor change, requires approval from ≥1 primary reviewer status/LGT2 Two reviewers already commented LGTM, ready for merge type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants