Do not touch /pool/stats from stats aggregation if PG recheck is active
This commit is contained in:
+19
-15
@@ -773,23 +773,27 @@ class Mon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const pool_id in this.state.pool.stats)
|
if (!this.recheck_pgs_active)
|
||||||
{
|
{
|
||||||
if (!seen_pools[pool_id])
|
// PG recheck also modifies /pool/stats, so don't touch it here if it's active
|
||||||
|
for (const pool_id in this.state.pool.stats)
|
||||||
{
|
{
|
||||||
txn.push({ requestDeleteRange: {
|
if (!seen_pools[pool_id])
|
||||||
key: b64(this.config.etcd_prefix+'/pool/stats/'+pool_id),
|
{
|
||||||
} });
|
txn.push({ requestDeleteRange: {
|
||||||
delete this.state.pool.stats[pool_id];
|
key: b64(this.config.etcd_prefix+'/pool/stats/'+pool_id),
|
||||||
}
|
} });
|
||||||
else
|
delete this.state.pool.stats[pool_id];
|
||||||
{
|
}
|
||||||
const pool_stats = { ...this.state.pool.stats[pool_id] };
|
else
|
||||||
serialize_bigints(pool_stats);
|
{
|
||||||
txn.push({ requestPut: {
|
const pool_stats = { ...this.state.pool.stats[pool_id] };
|
||||||
key: b64(this.config.etcd_prefix+'/pool/stats/'+pool_id),
|
serialize_bigints(pool_stats);
|
||||||
value: b64(JSON.stringify(pool_stats)),
|
txn.push({ requestPut: {
|
||||||
} });
|
key: b64(this.config.etcd_prefix+'/pool/stats/'+pool_id),
|
||||||
|
value: b64(JSON.stringify(pool_stats)),
|
||||||
|
} });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (txn.length)
|
if (txn.length)
|
||||||
|
|||||||
Reference in New Issue
Block a user