Skip to content

Commit

Permalink
Merge pull request emqx#2166 from fengzeroz/main
Browse files Browse the repository at this point in the history
Revert "cyclic reporting does not detect change"
  • Loading branch information
fengzeroz committed Jul 26, 2024
2 parents 59f8141 + c107ea2 commit 384676b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/adapter/driver/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(bool sub, int64_t timestamp, int64_t timeout,
static void read_report_group(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);
Expand Down Expand Up @@ -274,7 +274,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(true, global_timestamp, 0,
read_report_group(global_timestamp, 0,
neu_adapter_get_tag_cache_type(&driver->adapter),
driver->cache, group, tags, data->tags);

Expand Down Expand Up @@ -1917,7 +1917,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(false, global_timestamp,
read_report_group(global_timestamp,
neu_group_get_interval(group->group) *
NEU_DRIVER_TAG_CACHE_EXPIRE_TIME,
neu_adapter_get_tag_cache_type(&group->driver->adapter),
Expand Down Expand Up @@ -2094,7 +2094,7 @@ static int read_callback(void *usr_data)
return 0;
}

static void read_report_group(bool sub, int64_t timestamp, int64_t timeout,
static void read_report_group(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)
Expand All @@ -2104,7 +2104,7 @@ static void read_report_group(bool sub, int64_t timestamp, int64_t timeout,
neu_driver_cache_value_t value = { 0 };
neu_resp_tag_value_meta_t tag_value = { 0 };

if (sub && neu_tag_attribute_test(tag, NEU_ATTRIBUTE_SUBSCRIBE)) {
if (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) {
Expand Down

0 comments on commit 384676b

Please sign in to comment.