allow more than 2gb of mem to be allocated to hold resulting docids.

This commit is contained in:
Matt
2015-10-05 09:35:44 -07:00
parent 757a44b149
commit 9b785a1522
2 changed files with 13 additions and 10 deletions

@ -1243,11 +1243,12 @@ bool Msg40::reallocMsg20Buf ( ) {
m_buf2 = NULL;
m_bufMaxSize2 = need;
if ( need > 2000000000 ) {
log("msg40: need too much mem=%"INT64,need);
m_errno = g_errno;
return false;
}
// if ( need > 2000000000 ) {
// log("msg40: need too much mem=%"INT64,need);
// m_errno = ENOMEM;
// g_errno = ENOMEM;
// return false;
// }
// do the alloc
if ( need ) m_buf2 = (char *)mmalloc ( need ,"Msg40msg20");

@ -1261,11 +1261,13 @@ bool gotResults ( void *state ) {
}
// this causes ooms everywhere, not a good fix
// if ( ! msg40->m_msg20 && ! si->m_docIdsOnly ) {
// log("msg40: failed to get results q=%s",si->m_q.m_orig);
// g_errno = ENOMEM;
// return sendReply(st,NULL);
// }
if ( ! msg40->m_msg20 && ! si->m_docIdsOnly && msg40->m_errno ) {
log("msg40: failed to get results q=%s",si->m_q.m_orig);
//g_errno = ENOMEM;
g_errno = msg40->m_errno;
return sendReply(st,NULL);
}