Skip to content

Commit

Permalink
[BugFix] Fix automatic partition write data into wrong partition when…
Browse files Browse the repository at this point in the history
… many partition created concurrency (#34731)

Signed-off-by: meegoo <meegoo.sr@gmail.com>
(cherry picked from commit 2095a85)
  • Loading branch information
meegoo authored and mergify[bot] committed Nov 10, 2023
1 parent f443bad commit 37c9802
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion be/src/runtime/lake_tablets_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ Status LakeTabletsChannel::_create_delta_writers(const PTabletWriterOpenRequest&
std::sort(tablet_ids.begin(), tablet_ids.end());
DCHECK_EQ(_delta_writers.size(), tablet_ids.size());
for (size_t i = 0; i < tablet_ids.size(); ++i) {
_tablet_id_to_sorted_indexes.emplace(tablet_ids[i], i);
_tablet_id_to_sorted_indexes[tablet_ids[i]] = i;
}
}
return Status::OK();
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/local_tablets_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ Status LocalTabletsChannel::incremental_open(const PTabletWriterOpenRequest& par
DCHECK_EQ(_delta_writers.size(), tablet_ids.size());
std::sort(tablet_ids.begin(), tablet_ids.end());
for (size_t i = 0; i < tablet_ids.size(); ++i) {
_tablet_id_to_sorted_indexes.emplace(tablet_ids[i], i);
_tablet_id_to_sorted_indexes[tablet_ids[i]] = i;
}
}

Expand Down

0 comments on commit 37c9802

Please sign in to comment.