mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
Merge pull request #2215 from fengzeroz/v2.9
cyclic reporting does not detect change
This commit is contained in:
@@ -96,7 +96,7 @@ static void read_group_paginate(int64_t timestamp, int64_t timeout,
|
||||
neu_tag_cache_type_e cache_type,
|
||||
neu_driver_cache_t *cache, const char *group,
|
||||
UT_array *tags, UT_array *tag_values);
|
||||
static void read_report_group(int64_t timestamp, int64_t timeout,
|
||||
static void read_report_group(bool sub, int64_t timestamp, int64_t timeout,
|
||||
neu_tag_cache_type_e cache_type,
|
||||
neu_driver_cache_t *cache, const char *group,
|
||||
UT_array *tags, UT_array *tag_values);
|
||||
@@ -264,7 +264,7 @@ static void update_im(neu_adapter_t *adapter, const char *group,
|
||||
data->group = strdup(group);
|
||||
utarray_new(data->tags, neu_resp_tag_value_meta_icd());
|
||||
|
||||
read_report_group(global_timestamp, 0,
|
||||
read_report_group(true, global_timestamp, 0,
|
||||
neu_adapter_get_tag_cache_type(&driver->adapter),
|
||||
driver->cache, group, tags, data->tags);
|
||||
|
||||
@@ -1910,7 +1910,7 @@ static int report_callback(void *usr_data)
|
||||
data->group = strdup(group->name);
|
||||
utarray_new(data->tags, neu_resp_tag_value_meta_icd());
|
||||
|
||||
read_report_group(global_timestamp,
|
||||
read_report_group(false, global_timestamp,
|
||||
neu_group_get_interval(group->group) *
|
||||
NEU_DRIVER_TAG_CACHE_EXPIRE_TIME,
|
||||
neu_adapter_get_tag_cache_type(&group->driver->adapter),
|
||||
@@ -2087,7 +2087,7 @@ static int read_callback(void *usr_data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void read_report_group(int64_t timestamp, int64_t timeout,
|
||||
static void read_report_group(bool sub, int64_t timestamp, int64_t timeout,
|
||||
neu_tag_cache_type_e cache_type,
|
||||
neu_driver_cache_t *cache, const char *group,
|
||||
UT_array *tags, UT_array *tag_values)
|
||||
@@ -2097,7 +2097,7 @@ static void read_report_group(int64_t timestamp, int64_t timeout,
|
||||
neu_driver_cache_value_t value = { 0 };
|
||||
neu_resp_tag_value_meta_t tag_value = { 0 };
|
||||
|
||||
if (neu_tag_attribute_test(tag, NEU_ATTRIBUTE_SUBSCRIBE)) {
|
||||
if (sub && neu_tag_attribute_test(tag, NEU_ATTRIBUTE_SUBSCRIBE)) {
|
||||
if (neu_driver_cache_meta_get_changed(cache, group, tag->name,
|
||||
&value, tag_value.metas,
|
||||
NEU_TAG_META_SIZE) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user