Prevent multiple parallel recheck_pgs in case of timeouts
Test / buildenv (push) Successful in 9s Details
Test / build (push) Successful in 2m34s Details
Test / test_cas (push) Successful in 8s Details
Test / make_test (push) Successful in 31s Details
Test / test_change_pg_size (push) Successful in 9s Details
Test / test_create_nomaxid (push) Successful in 7s Details
Test / test_change_pg_count (push) Successful in 43s Details
Test / test_change_pg_count_ec (push) Successful in 42s Details
Test / test_etcd_fail (push) Successful in 1m28s Details
Test / test_interrupted_rebalance_imm (push) Successful in 1m25s Details
Test / test_add_osd (push) Successful in 3m3s Details
Test / test_failure_domain (push) Successful in 20s Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 1m25s Details
Test / test_interrupted_rebalance_ec (push) Successful in 1m52s Details
Test / test_interrupted_rebalance (push) Successful in 3m24s Details
Test / test_snapshot (push) Successful in 50s Details
Test / test_snapshot_ec (push) Successful in 37s Details
Test / test_minsize_1 (push) Successful in 13s Details
Test / test_rm (push) Successful in 12s Details
Test / test_move_reappear (push) Successful in 17s Details
Test / test_snapshot_down (push) Successful in 30s Details
Test / test_snapshot_down_ec (push) Successful in 31s Details
Test / test_splitbrain (push) Successful in 22s Details
Test / test_snapshot_chain (push) Successful in 2m25s Details
Test / test_snapshot_chain_ec (push) Failing after 3m7s Details
Test / test_rebalance_verify_imm (push) Successful in 3m0s Details
Test / test_rebalance_verify (push) Successful in 3m54s Details
Test / test_write (push) Successful in 34s Details
Test / test_write_no_same (push) Successful in 14s Details
Test / test_write_xor (push) Successful in 52s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 4m6s Details
Test / test_rebalance_verify_ec (push) Successful in 5m10s Details
Test / test_heal_pg_size_2 (push) Successful in 4m1s Details
Test / test_heal_ec (push) Successful in 4m21s Details
Test / test_heal_csum_32k_dmj (push) Successful in 5m10s Details
Test / test_heal_csum_32k_dj (push) Successful in 5m51s Details
Test / test_heal_csum_32k (push) Successful in 6m54s Details
Test / test_heal_csum_4k_dmj (push) Successful in 6m38s Details
Test / test_scrub (push) Successful in 1m9s Details
Test / test_scrub_zero_osd_2 (push) Successful in 1m2s Details
Test / test_scrub_xor (push) Successful in 43s Details
Test / test_heal_csum_4k_dj (push) Successful in 6m24s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 1m16s Details
Test / test_scrub_pg_size_3 (push) Successful in 1m38s Details
Test / test_scrub_ec (push) Successful in 37s Details
Test / test_heal_csum_4k (push) Successful in 6m2s Details

rdma-simple-nodp
Vitaliy Filippov 2023-11-04 20:59:56 +03:00
parent e15b6e7805
commit 43cb9ae212
1 changed files with 10 additions and 1 deletions

View File

@ -403,6 +403,7 @@ class Mon
this.ws_alive = false;
this.ws_keepalive_timer = null;
this.on_stop_cb = () => this.on_stop(0).catch(console.error);
this.recheck_pgs_active = false;
}
parse_etcd_addresses(addrs)
@ -1203,6 +1204,12 @@ class Mon
async recheck_pgs()
{
if (this.recheck_pgs_active)
{
this.schedule_recheck();
return;
}
this.recheck_pgs_active = true;
// Take configuration and state, check it against the stored configuration hash
// Recalculate PGs and save them to etcd if the configuration is changed
// FIXME: Do not change anything if the distribution is good and random enough and no PGs are degraded
@ -1224,6 +1231,7 @@ class Mon
// Pool deleted. Delete all PGs, but first stop them.
if (!await this.stop_all_pgs(pool_id))
{
this.recheck_pgs_active = false;
this.schedule_recheck();
return;
}
@ -1292,6 +1300,7 @@ class Mon
// PG count changed. Need to bring all PGs down.
if (!await this.stop_all_pgs(pool_id))
{
this.recheck_pgs_active = false;
this.schedule_recheck();
return;
}
@ -1396,6 +1405,7 @@ class Mon
await this.save_pg_config(new_config_pgs);
}
}
this.recheck_pgs_active = false;
}
async save_pg_config(new_config_pgs, etcd_request = { compare: [], success: [] })
@ -1445,7 +1455,6 @@ class Mon
}
// Schedule a recheck to run after a small timeout (1s)
// If already scheduled, cancel previous timer and schedule it again
// This is required for multiple change events to trigger at most 1 recheck in 1s
schedule_recheck()
{