Add a regression test for scrub bitmap comparison (EC 3+3, only chunk 1 written and lost)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "addr_util.h"
|
||||
#include "osd_primary.h"
|
||||
#include "osd.h"
|
||||
#include "osd_rmw.h"
|
||||
#include "http_client.h"
|
||||
#include "str_util.h"
|
||||
#include "json_util.h"
|
||||
@@ -113,6 +114,10 @@ osd_t::~osd_t()
|
||||
close(listen_fd);
|
||||
listen_fds.clear();
|
||||
free(zero_buffer);
|
||||
for (auto & pp: pgs)
|
||||
if (pp.second.scheme == POOL_SCHEME_EC)
|
||||
use_ec(pp.second.pg_size, pp.second.pg_data_size, false);
|
||||
pgs.clear();
|
||||
}
|
||||
|
||||
void osd_t::init_blockstore(std::function<void()> on_init)
|
||||
|
||||
@@ -962,6 +962,8 @@ void osd_t::apply_pg_config()
|
||||
}
|
||||
}
|
||||
auto & pg = this->pgs[{ .pool_id = pool_id, .pg_num = pg_num }];
|
||||
if (pg.scheme == POOL_SCHEME_EC)
|
||||
use_ec(pg.pg_size, pg.pg_data_size, false);
|
||||
pg.state = pg_cfg.cur_primary == this->osd_num ? PG_PEERING : PG_STARTING;
|
||||
pg.scheme = pool_cfg.scheme;
|
||||
pg.pg_cursize = 0;
|
||||
@@ -980,9 +982,7 @@ void osd_t::apply_pg_config()
|
||||
(pool_cfg.scheme != POOL_SCHEME_REPLICATED ||
|
||||
pool_cfg.local_reads == POOL_LOCAL_READ_PRIMARY);
|
||||
if (pg.scheme == POOL_SCHEME_EC)
|
||||
{
|
||||
use_ec(pg.pg_size, pg.pg_data_size, true);
|
||||
}
|
||||
this->pg_state_dirty.insert({ .pool_id = pool_id, .pg_num = pg_num });
|
||||
pg.print_state();
|
||||
if (pg_cfg.cur_primary == this->osd_num)
|
||||
|
||||
Reference in New Issue
Block a user