mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::db: Move column alignment check outside of DB::Open ctor closure.
This commit is contained in:
parent
d3e61abe7d
commit
5544da61b8
1 changed files with 10 additions and 10 deletions
20
ircd/db.cc
20
ircd/db.cc
|
@ -956,16 +956,6 @@ try
|
|||
this->column_index.at(handle->GetName()) = handle->GetID();
|
||||
}
|
||||
|
||||
for(size_t i(0); i < this->columns.size(); ++i)
|
||||
if(db::id(*this->columns[i]) != i)
|
||||
throw error
|
||||
{
|
||||
"Columns misaligned: expecting id[%zd] got id[%u] '%s'",
|
||||
i,
|
||||
db::id(*this->columns[i]),
|
||||
db::name(*this->columns[i])
|
||||
};
|
||||
|
||||
return ret;
|
||||
}()}
|
||||
,uuid{[this]
|
||||
|
@ -991,6 +981,16 @@ try
|
|||
return checkpointer;
|
||||
}()}
|
||||
{
|
||||
for(size_t i(0); i < this->columns.size(); ++i)
|
||||
if(db::id(*this->columns[i]) != i)
|
||||
throw error
|
||||
{
|
||||
"Columns misaligned: expecting id[%zd] got id[%u] '%s'",
|
||||
i,
|
||||
db::id(*this->columns[i]),
|
||||
db::name(*this->columns[i])
|
||||
};
|
||||
|
||||
if(ircd::checkdb)
|
||||
{
|
||||
log::notice
|
||||
|
|
Loading…
Reference in a new issue