From df99e232eec6d884f1c01031614e9759a196e4d0 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 27 Mar 2021 18:16:00 +0300 Subject: [PATCH] Deduplicate osd_sets in pg history + raise request size limit for etcd --- mon/make-units.sh | 3 ++- mon/mon.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mon/make-units.sh b/mon/make-units.sh index a76140784..ab74faff6 100755 --- a/mon/make-units.sh +++ b/mon/make-units.sh @@ -32,7 +32,8 @@ ExecStart=/usr/local/bin/etcd -name etcd$ETCD_NUM --data-dir /var/lib/etcd$ETCD_ --advertise-client-urls http://$IP:2379 --listen-client-urls http://$IP:2379 \\ --initial-advertise-peer-urls http://$IP:2380 --listen-peer-urls http://$IP:2380 \\ --initial-cluster-token vitastor-etcd-1 --initial-cluster $ETCD_HOSTS \\ - --initial-cluster-state new --max-txn-ops=100000 --auto-compaction-retention=10 --auto-compaction-mode=revision + --initial-cluster-state new --max-txn-ops=100000 --max-request-bytes=104857600 \\ + --auto-compaction-retention=10 --auto-compaction-mode=revision WorkingDirectory=/var/lib/etcd$ETCD_NUM.etcd ExecStartPre=+chown -R etcd /var/lib/etcd$ETCD_NUM.etcd User=etcd diff --git a/mon/mon.js b/mon/mon.js index 06810c3ec..c75bb284f 100644 --- a/mon/mon.js +++ b/mon/mon.js @@ -692,6 +692,11 @@ class Mon pg_history[i].osd_sets = pg_history[i].osd_sets || []; pg_history[i].osd_sets.push(prev_pgs[i]); } + if (pg_history[i] && pg_history[i].osd_sets) + { + pg_history[i].osd_sets = Object.values(pg_history[i].osd_sets + .reduce((a, c) => { a[c.join(' ')] = c; return a; }, {})); + } }); for (let i = 0; i < new_pgs.length || i < prev_pgs.length; i++) {