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 c4291bcbacf [fix](move-memtable) make sure index descriptor is set
when creating delta writer (#30157)
c4291bcbacf is described below
commit c4291bcbacf0d59132b41e80e07d4f2460dbf51a
Author: Kaijie Chen <[email protected]>
AuthorDate: Mon Jan 22 20:35:18 2024 +0800
[fix](move-memtable) make sure index descriptor is set when creating delta
writer (#30157)
---------
Co-authored-by: Yongqiang YANG
<[email protected]>
Co-authored-by: Xin Liao <[email protected]>
---
be/src/vec/sink/writer/vtablet_writer_v2.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/be/src/vec/sink/writer/vtablet_writer_v2.cpp
b/be/src/vec/sink/writer/vtablet_writer_v2.cpp
index e23fe761ecf..cfeeb782bed 100644
--- a/be/src/vec/sink/writer/vtablet_writer_v2.cpp
+++ b/be/src/vec/sink/writer/vtablet_writer_v2.cpp
@@ -431,15 +431,27 @@ Status
VTabletWriterV2::_write_memtable(std::shared_ptr<vectorized::Block> block
.is_high_priority = _is_high_priority,
.write_file_cache = _write_file_cache,
};
+ bool index_not_found = true;
for (const auto& index : _schema->indexes()) {
if (index->index_id == rows.index_id) {
req.slots = &index->slots;
req.schema_hash = index->schema_hash;
+ index_not_found = false;
break;
}
}
+ if (index_not_found) {
+ LOG(WARNING) << "index " << rows.index_id
+ << " not found in schema, load_id=" <<
print_id(_load_id);
+ return std::unique_ptr<DeltaWriterV2>(nullptr);
+ }
return DeltaWriterV2::open(&req, streams, _state);
});
+ if (delta_writer == nullptr) {
+ LOG(WARNING) << "failed to open DeltaWriter for tablet " << tablet_id
+ << ", load_id=" << print_id(_load_id);
+ return Status::InternalError("failed to open DeltaWriter for tablet
{}", tablet_id);
+ }
{
SCOPED_TIMER(_wait_mem_limit_timer);
ExecEnv::GetInstance()->memtable_memory_limiter()->handle_memtable_flush();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]