Skip to content
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

Output fake txn when no entry event comes before a resolved event #83

Merged
merged 1 commit into from
Nov 4, 2019
Merged

Output fake txn when no entry event comes before a resolved event #83

merged 1 commit into from
Nov 4, 2019

Conversation

suzaku
Copy link
Contributor

@suzaku suzaku commented Nov 1, 2019

What problem does this PR solve?

We need to make sure heartbeat events are forwarded.
When we receive a resolved event and there's no entry event that comes with a smaller ts before it, we take it as a heartbeat event.

What is changed and how it works?

Wrap a resolved event as an empty RawTxn.

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

@suzaku suzaku added the status/ptal Could you please take a look? label Nov 1, 2019
@@ -129,6 +128,14 @@ func CollectRawTxns(
return err
}
}
if len(readyTxns) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

how about put L131 - L137 after L121

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's the difference?

Copy link
Contributor

@zier-one zier-one Nov 4, 2019

Choose a reason for hiding this comment

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

if readyTxns is empty, we can skip the loop on L126.

Copy link
Contributor

Choose a reason for hiding this comment

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

But never mind, not a big deal here.

@zier-one
Copy link
Contributor

zier-one commented Nov 4, 2019

LGTM

@zier-one zier-one added LGT1 and removed status/ptal Could you please take a look? labels Nov 4, 2019
Copy link
Contributor

@amyangfei amyangfei left a comment

Choose a reason for hiding this comment

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

LGTM

@amyangfei amyangfei added LGT2 and removed LGT1 labels Nov 4, 2019
@suzaku suzaku merged commit 7c801ff into pingcap:master Nov 4, 2019
@suzaku suzaku deleted the output-fake-txn branch November 4, 2019 03:12
5kbpers pushed a commit to 5kbpers/ticdc that referenced this pull request Aug 24, 2020
amyangfei added a commit to amyangfei/tiflow that referenced this pull request May 6, 2022
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.

3 participants