@cryptotaxi247 / netdata-1 / commits / 8194ac83f

Fixed chart's last accessed time during context queries (#9952)

Stelios Fragkakis committed Sep 18, 2020 at 23:45 UTC 8194ac83f064814c86a332ab00634c50300646f8
1 file changed +3 -1
web/api/formatters/rrd2json.c
+3 -1
@@ -141,7 +141,8 @@ int rrdset2anything_api_v1(
141 , time_t *latest_timestamp
142 , char *context
143 ) {
144 - st->last_accessed_time = now_realtime_sec();
144 + time_t last_accessed_time = now_realtime_sec();
145 + st->last_accessed_time = last_accessed_time;
146
147 RRDDIM *temp_rd = NULL;
148
@@ -153,6 +154,7 @@ int rrdset2anything_api_v1(
154 // Loop the dimensions of the chart
155 RRDDIM *rd1;
156 rrdset_rdlock(st1);
157 + st1->last_accessed_time = last_accessed_time;
158 rrddim_foreach_read(rd1, st1) {
159 RRDDIM *rd = mallocz(rd1->memsize);
160 memcpy(rd, rd1, rd1->memsize);