xiaokang commented on code in PR #16263:
URL: https://github.com/apache/doris/pull/16263#discussion_r1094425555
##########
be/src/common/config.h:
##########
@@ -246,6 +246,7 @@ CONF_mBool(row_nums_check, "true");
// modify them upon necessity
CONF_Int32(min_file_descriptor_number, "60000");
CONF_Int64(index_stream_cache_capacity, "10737418240");
+CONF_String(row_cache_mem_limit, "20%");
Review Comment:
default 20% is a little large compared to page_cache
##########
be/src/vec/jsonb/serialize.cpp:
##########
@@ -319,4 +319,22 @@ void JsonbSerializeUtil::jsonb_to_block(const
TupleDescriptor& desc,
}
}
+// single row
+void JsonbSerializeUtil::jsonb_to_block(const TupleDescriptor& desc, const
Slice& data,
Review Comment:
jsonb_to_block for single row can be reused by jsonb_to_block for multiple
rows
##########
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 insert new value to cache
--
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]