eldenmoon commented on code in PR #16263:
URL: https://github.com/apache/doris/pull/16263#discussion_r1095308774
##########
be/src/olap/rowset/segment_v2/segment_writer.cpp:
##########
@@ -252,8 +253,13 @@ Status SegmentWriter::append_block(const
vectorized::Block* block, size_t row_po
if (_tablet_schema->keys_type() == UNIQUE_KEYS &&
_opts.enable_unique_key_merge_on_write) {
// create primary indexes
for (size_t pos = 0; pos < num_rows; pos++) {
- RETURN_IF_ERROR(
-
_primary_key_index_builder->add_item(_full_encode_keys(key_columns, pos)));
+ const std::string& key = _full_encode_keys(key_columns, pos);
+ RETURN_IF_ERROR(_primary_key_index_builder->add_item(key));
+ if (!config::disable_storage_row_cache &&
_tablet_schema->store_row_column() &&
+ _opts.is_direct_write) {
+ // invalidate cache
+ RowCache::instance()->erase({_opts.rowset_ctx->tablet_id,
key});
Review Comment:
can not insert value because load may be failed, and rowset is not visible
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]