Skip to content

[Fix](partial update) Persist partial_update_info in RocksDB in case of BE restart after a partial update has commited - #38331

Merged
dataroaring merged 3 commits into
apache:masterfrom
bobhan1:persist-partial-update-info
Aug 7, 2024
Merged

[Fix](partial update) Persist partial_update_info in RocksDB in case of BE restart after a partial update has commited#38331
dataroaring merged 3 commits into
apache:masterfrom
bobhan1:persist-partial-update-info

Conversation

@bobhan1

@bobhan1bobhan1 commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

Proposed changes

If a partial update has conflict with another load during publish phase, it should combine the two load's data into one to get the corrrect result. This procedure needs partial update info. But If BE crashed after the partial update load has committed, the partial update info will be missing becasuse it's not persisted and will not be restored in DataDir::load(). This PR persists partial update info in RocksDB before the txn is commited and remove it after the publish phase.
Before #25147, partial update info is persisted with tablet_schema in RocksDB. #25147 split partial update info from tablet schema but forget to handle the persistence logic.

branch-2.1-pick: #39035
branch-2.0-pick: #39078

@doris-robot

Copy link
Copy Markdown

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@bobhan1
bobhan1force-pushed the persist-partial-update-info branch from 236a525 to e79f107CompareJuly 24, 2024 14:57

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions


#include "olap/partial_update_info.h"

#include <gen_cpp/olap_file.pb.h>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: 'gen_cpp/olap_file.pb.h' file not found [clang-diagnostic-error]

#include<gen_cpp/olap_file.pb.h>
^

struct PartialUpdateInfo {
void init(const TabletSchema& tablet_schema, bool partial_update,
const std::set<string>& partial_update_cols, bool is_strict_mode,
const std::set<std::string>& partial_update_cols, bool is_strict_mode,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: no template named 'set' in namespace 'std' [clang-diagnostic-error]

const std::set<std::string>& partial_update_cols, bool is_strict_mode,
^

#ifndef DORIS_BE_SRC_OLAP_ROWSET_ROWSET_META_MANAGER_H
#define DORIS_BE_SRC_OLAP_ROWSET_ROWSET_META_MANAGER_H

#include <gen_cpp/olap_file.pb.h>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: 'gen_cpp/olap_file.pb.h' file not found [clang-diagnostic-error]

#include<gen_cpp/olap_file.pb.h>
^

@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run buildall

1 similar comment
@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run buildall

@bobhan1
bobhan1force-pushed the persist-partial-update-info branch from ad2d9a9 to efe2ea6CompareJuly 25, 2024 11:54
@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run buildall

@bobhan1
bobhan1force-pushed the persist-partial-update-info branch from efe2ea6 to 762e3efCompareJuly 29, 2024 02:15
@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run buildall

Comment threadbe/src/olap/rowset/rowset_meta_manager.cpp Outdated
Comment threadbe/src/olap/rowset/rowset_meta_manager.cpp Outdated
Comment threadbe/src/olap/txn_manager.cpp Outdated
Comment threadbe/src/olap/storage_engine.cpp Outdated
@bobhan1
bobhan1force-pushed the persist-partial-update-info branch 2 times, most recently from 68d404b to 4095139CompareJuly 31, 2024 03:32
@dataroaring

Copy link
Copy Markdown
Contributor

run buildall

@bobhan1
bobhan1force-pushed the persist-partial-update-info branch from 4095139 to f9af921CompareAugust 1, 2024 05:54
tmp
tmp
tmp
tmp
finish
finish case
tmp
fix
fix complie
tmp
tmp
tmp
tmp
@bobhan1
bobhan1force-pushed the persist-partial-update-info branch from f9af921 to d4b8f3bCompareAugust 1, 2024 06:08
zhannngchen
zhannngchen previously approved these changes Aug 1, 2024

@zhannngchenzhannngchen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Aug 1, 2024
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@github-actionsgithub-actionsBot removed the approved Indicates a PR has been approved by one committer. label Aug 1, 2024
@bobhan1
bobhan1force-pushed the persist-partial-update-info branch from be9266f to 628fb44CompareAugust 1, 2024 06:33
@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run buildall

zhannngchen
zhannngchen previously approved these changes Aug 1, 2024

@zhannngchenzhannngchen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Aug 1, 2024
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@hust-hhbhust-hhb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@dataroaring
dataroaring merged commit 0b834be into apache:masterAug 7, 2024
zhannngchen pushed a commit that referenced this pull request Aug 8, 2024
… in RocksDB in case of BE restart after a partial update has commited #38331" (#39035)
picks #38331 and
#39066
zhannngchen pushed a commit that referenced this pull request Aug 8, 2024
dataroaring pushed a commit that referenced this pull request Aug 9, 2024
… in RocksDB in case of BE restart after a partial update has commited #38331" (#39078)
picks #38331 and
#39066
dataroaring pushed a commit that referenced this pull request Aug 11, 2024
…of BE restart after a partial update has commited (#38331)
## Proposed changes
If a partial update has conflict with another load during publish phase,
it should combine the two load's data into one to get the corrrect
result. This procedure needs partial update info. But If BE crashed
after the partial update load has committed, the partial update info
will be missing becasuse it's not persisted and will not be restored in
`DataDir::load()`. This PR persists partial update info in RocksDB
before the txn is commited and remove it after the publish phase.
Before #25147, partial update info
is persisted with tablet_schema in RocksDB.
#25147 split partial update info
from tablet schema but forget to handle the persistence logic.
dataroaring pushed a commit that referenced this pull request Aug 11, 2024
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Aug 14, 2024
…of BE restart after a partial update has commited (apache#38331)
## Proposed changes
If a partial update has conflict with another load during publish phase,
it should combine the two load's data into one to get the corrrect
result. This procedure needs partial update info. But If BE crashed
after the partial update load has committed, the partial update info
will be missing becasuse it's not persisted and will not be restored in
`DataDir::load()`. This PR persists partial update info in RocksDB
before the txn is commited and remove it after the publish phase.
Before apache#25147, partial update info
is persisted with tablet_schema in RocksDB.
apache#25147 split partial update info
from tablet schema but forget to handle the persistence logic.
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Aug 14, 2024
dataroaring pushed a commit that referenced this pull request Aug 16, 2024
…of BE restart after a partial update has commited (#38331)
## Proposed changes
If a partial update has conflict with another load during publish phase,
it should combine the two load's data into one to get the corrrect
result. This procedure needs partial update info. But If BE crashed
after the partial update load has committed, the partial update info
will be missing becasuse it's not persisted and will not be restored in
`DataDir::load()`. This PR persists partial update info in RocksDB
before the txn is commited and remove it after the publish phase.
Before #25147, partial update info
is persisted with tablet_schema in RocksDB.
#25147 split partial update info
from tablet schema but forget to handle the persistence logic.
dataroaring pushed a commit that referenced this pull request Aug 16, 2024
GoGoWen pushed a commit to GoGoWen/incubator-doris that referenced this pull request Aug 27, 2024
… in RocksDB in case of BE restart after a partial update has commited apache#38331" (apache#39078)
picks apache#38331 and
apache#39066
@gavinchougavinchou mentioned this pull request Oct 13, 2024
bobhan1 added a commit to bobhan1/doris that referenced this pull request Jan 21, 2025
… in RocksDB in case of BE restart after a partial update has commited apache#38331" (apache#39078)
picks apache#38331 and
apache#39066
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
…of BE restart after a partial update has commited (apache#38331)
## Proposed changes
If a partial update has conflict with another load during publish phase,
it should combine the two load's data into one to get the corrrect
result. This procedure needs partial update info. But If BE crashed
after the partial update load has committed, the partial update info
will be missing becasuse it's not persisted and will not be restored in
`DataDir::load()`. This PR persists partial update info in RocksDB
before the txn is commited and remove it after the publish phase.
Before apache#25147, partial update info
is persisted with tablet_schema in RocksDB.
apache#25147 split partial update info
from tablet schema but forget to handle the persistence logic.
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@bobhan1@doris-robot@dataroaring@hust-hhb@zhannngchen@Yukang-Lian