Bug#24951, Data nodes died(lgman) during creating tables

parent e2dea46a
......@@ -599,8 +599,12 @@ void Dbtup::execTUP_ADD_ATTRREQ(Signal* signal)
Uint32 sz= sizeof(Disk_undo::Create) >> 2;
Logfile_client lgman(this, c_lgman, regFragPtr.p->m_logfile_group_id);
(void) c_lgman->alloc_log_space(regFragPtr.p->m_logfile_group_id,
sz);
if((terrorCode =
c_lgman->alloc_log_space(regFragPtr.p->m_logfile_group_id, sz)))
{
addattrrefuseLab(signal, regFragPtr, fragOperPtr, regTabPtr.p, fragId);
return;
}
int res= lgman.get_log_buffer(signal, sz, &cb);
switch(res){
......
......@@ -1961,6 +1961,11 @@ Lgman::alloc_log_space(Uint32 ref, Uint32 words)
if(m_logfile_group_hash.find(ptr, key) &&
ptr.p->m_free_file_words >= (words + (4 * File_formats::UNDO_PAGE_WORDS)))
{
Uint32 group_pages =
((ptr.p->m_free_file_words + File_formats::UNDO_PAGE_WORDS - 1)/ File_formats::UNDO_PAGE_WORDS);
if(group_pages > compute_free_file_pages(ptr))
return 1501;
ptr.p->m_free_file_words -= words;
validate_logfile_group(ptr, "alloc_log_space");
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment