You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/02/10 15:55:04 UTC
[doris] branch master updated: [Bug](point query) make get_rowset thread safe (#16609)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8749aedbae [Bug](point query) make get_rowset thread safe (#16609)
8749aedbae is described below
commit 8749aedbae74e207bc73865af67a0e49552c18e1
Author: lihangyu <15...@163.com>
AuthorDate: Fri Feb 10 23:54:56 2023 +0800
[Bug](point query) make get_rowset thread safe (#16609)
`get_rowset` calling from `lookup_row_data` without lock will lead to core dump if _rs_version_map, _stale_rs_version_map changed
---
be/src/olap/tablet.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index 60f7a193ff..ab095be7d5 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -266,6 +266,7 @@ Status Tablet::revise_tablet_meta(const std::vector<RowsetMetaSharedPtr>& rowset
}
RowsetSharedPtr Tablet::get_rowset(const RowsetId& rowset_id) {
+ std::lock_guard<std::shared_mutex> wrlock(_meta_lock);
for (auto& version_rowset : _rs_version_map) {
if (version_rowset.second->rowset_id() == rowset_id) {
return version_rowset.second;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org