Skip to content

[Bug-fix] Fix the replay error in stream load manager#5722

Merged
morningman merged 8 commits intoapache:masterfrom
EmmyMiao87:stream_load_audit
May 5, 2021
Merged

[Bug-fix] Fix the replay error in stream load manager#5722
morningman merged 8 commits intoapache:masterfrom
EmmyMiao87:stream_load_audit

Conversation

@EmmyMiao87
Copy link
Contributor

@EmmyMiao87 EmmyMiao87 commented Apr 28, 2021

Proposed changes

Fix the replay error in stream load manager

The previous replay logic does not record the size of the map, which eventually resulted in EOF when reading the log.
This pr replaces the replay logic directly with json.

At the same time, the replay logic of image is supplemented.
The pr ensure that the attributes 'lastStreamLoadTime' of backend can be correctly recorded in the image.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

caiconghui
caiconghui previously approved these changes Apr 28, 2021
Copy link
Contributor

@caiconghui caiconghui left a comment

Choose a reason for hiding this comment

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

LGTM

@EmmyMiao87 EmmyMiao87 changed the title Fix the replay error in stream load manager [Bug-fix] Fix the replay error in stream load manager Apr 28, 2021
@EmmyMiao87 EmmyMiao87 added kind/fix Categorizes issue or PR as related to a bug. kind/meta-version-change Categorizes issue or PR as related to changing meta version area/catalog Issues or PRs related to catalog management labels Apr 28, 2021
if (beIdToLastStreamLoad.containsKey(backend.getId())) {
long lastStreamLoadTime = beIdToLastStreamLoad.get(backend.getId());
LOG.info("Replay stream load bdbje. backend: {}, last stream load version: {}", backend.getHost(), lastStreamLoadTime);
LOG.info("Replay stream load bdbje. backend: {}, last stream load time: {}", backend.getHost(), lastStreamLoadTime);
Copy link
Contributor

Choose a reason for hiding this comment

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

what if disable stream load the value for lastStreamLoadTime will be?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In fact, even if the collection process of be is disabled.
The stream load record of fe will still obtain stream load information regularly.
It’s just that every time you get it is empty.

In fact, FE can also add another variable to stop obtaining stream load record.
But there are too many variables.
To avoid using complexity.
I did not add this switch to fe.

The previous replay logic does not record the size of the map, which eventually resulted in EOF when reading the log.
This pr replaces the replay logic directly with json.

At the same time, the replay logic of image is supplemented.
The pr ensure that the attributes 'lastStreamLoadTime' of backend can be correctly recorded in the image.

Fixed apache#5729
False: disable stream load record
The default is disable.
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Apr 30, 2021
@morningman morningman merged commit eb1fdd0 into apache:master May 5, 2021
morningman added a commit to morningman/doris that referenced this pull request May 8, 2021
This bug is introduced from apache#5722

Also fix a bug of creating dynamic history partitions, introduced from apache#5703
@morningman morningman mentioned this pull request May 8, 2021
10 tasks
morningman added a commit that referenced this pull request May 10, 2021
This bug is introduced from #5722

Also fix a bug of creating dynamic history partitions, introduced from #5703
EmmyMiao87 added a commit to EmmyMiao87/incubator-doris that referenced this pull request May 14, 2021
The previous replay logic does not record the size of the map, which eventually resulted in EOF when reading the log.
This pr replaces the replay logic directly with json.

At the same time, the replay logic of image is supplemented.
The pr ensure that the attributes 'lastStreamLoadTime' of backend can be correctly recorded in the image.
EmmyMiao87 pushed a commit to EmmyMiao87/incubator-doris that referenced this pull request May 14, 2021
This bug is introduced from apache#5722

Also fix a bug of creating dynamic history partitions, introduced from apache#5703
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/catalog Issues or PRs related to catalog management kind/fix Categorizes issue or PR as related to a bug. kind/meta-version-change Categorizes issue or PR as related to changing meta version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Fe cannot be restarted, when the stream load record manager takes effect

3 participants