Merge pull request #2224 from hxy7yx/v2.7-1

[2.7]fix(read paginate):handle only_write tags
This commit is contained in:
fengzeroz
2024-09-19 10:45:56 +08:00
committed by GitHub
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -2186,6 +2186,13 @@ static void read_group_paginate(int64_t timestamp, int64_t timeout,
tag_value.datatag.option = tag->option;
memcpy(tag_value.datatag.meta, tag->meta, NEU_TAG_META_LENGTH);
if (tag->attribute == NEU_ATTRIBUTE_WRITE) {
tag_value.value.type = NEU_TYPE_STRING;
tag_value.value.value.str[0] = 0;
utarray_push_back(tag_values, &tag_value);
continue;
}
if (neu_driver_cache_meta_get(cache, group, tag->name, &value,
tag_value.metas,
NEU_TAG_META_SIZE) != 0) {
+2 -2
View File
@@ -315,8 +315,8 @@ UT_array *neu_group_query_read_tag_paginate(neu_group_t *group,
};
pthread_mutex_lock(&group->mtx);
array = filter_tags_by_page(group->tags, is_readable_and_match_query, &q,
current_page, page_size, total_count);
array = filter_tags_by_page(group->tags, match_query, &q, current_page,
page_size, total_count);
pthread_mutex_unlock(&group->mtx);
return array;