Fixed issue where restoring from disk would increment MAX.TS.
@@ -3001,6 +3001,18 @@ inc_cache_ii32 (GKHashStorage * store, GModule module, GSMetric metric, uint32_t
return inc_ii32 (cache, ckey, kh_val (hash, k));
}
+static int
+ins_cache_iu64 (GKHashStorage * store, GModule module, GSMetric metric, uint32_t key,
+ uint32_t ckey) {
+ khash_t (iu64) * hash = get_hash_from_store (store, module, metric);
+ khash_t (iu64) * cache = get_hash_from_cache (module, metric);
+ khint_t k;
+
+ if ((k = kh_get (iu64, hash, key)) == kh_end (hash))
+ return -1;
+ return ins_iu64 (cache, ckey, kh_val (hash, k));
+}
+
static int
inc_cache_iu64 (GKHashStorage * store, GModule module, GSMetric metric, uint32_t key,
uint32_t ckey) {
@@ -3048,7 +3060,7 @@ ins_raw_num_data (GModule module, uint32_t date) {
inc_cache_ii32 (store, module, MTRC_VISITORS, kh_val (kmap, k), ckey);
inc_cache_iu64 (store, module, MTRC_BW, kh_val (kmap, k), ckey);
inc_cache_iu64 (store, module, MTRC_CUMTS, kh_val (kmap, k), ckey);
- inc_cache_iu64 (store, module, MTRC_MAXTS, kh_val (kmap, k), ckey);
+ ins_cache_iu64 (store, module, MTRC_MAXTS, kh_val (kmap, k), ckey);
ins_cache_is32 (store, module, MTRC_METHODS, kh_val (kmap, k), ckey);
ins_cache_is32 (store, module, MTRC_PROTOCOLS, kh_val (kmap, k), ckey);
}
