mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
parent
27172945c7
commit
ba8ebc7794
@ -399,9 +399,7 @@ void handleRequest20 ( UdpSlot *slot , int32_t netnice ) {
|
||||
// sanity check, the size include the \0
|
||||
if ( req->m_collnum < 0 ) {
|
||||
log("query: Got empty collection in msg20 handler. FIX!");
|
||||
g_udpServer.sendErrorReply ( slot , ENOTFOUND );
|
||||
return;
|
||||
//char *xx =NULL; *xx = 0;
|
||||
char *xx =NULL; *xx = 0;
|
||||
}
|
||||
// if it's not stored locally that's an error
|
||||
if ( req->m_docId >= 0 && ! g_titledb.isLocal ( req->m_docId ) ) {
|
||||
|
@ -387,14 +387,6 @@ bool RdbList::addRecord ( char *key , int32_t dataSize , char *data ,
|
||||
m_listSize += 4;
|
||||
m_listEnd += 4;
|
||||
}
|
||||
// corruption in tree?
|
||||
if ( ! data && dataSize ) {
|
||||
log("db: corrupt list with datasize and no data. "
|
||||
"skipping key.");
|
||||
m_listSize -= m_ks;
|
||||
m_listEnd -= m_ks;
|
||||
return true;
|
||||
}
|
||||
// copy the data itself to the list
|
||||
gbmemcpy ( &m_list[m_listSize] , data , dataSize );
|
||||
m_listSize += dataSize;
|
||||
|
14
RdbTree.cpp
14
RdbTree.cpp
@ -2467,8 +2467,8 @@ void threadDoneWrapper ( void *state , ThreadEntry *t ) {
|
||||
THIS->m_dbname,mstrerror(g_errno));
|
||||
else
|
||||
// log it
|
||||
log("db: Done saving %s/%s-saved.dat (%"INT64" bytes)",
|
||||
THIS->m_dir,THIS->m_dbname,THIS->m_bytesWritten);
|
||||
log("db: Done saving %s/%s-saved.dat",
|
||||
THIS->m_dir,THIS->m_dbname);
|
||||
// . call callback
|
||||
if ( THIS->m_callback ) THIS->m_callback ( THIS->m_state );
|
||||
}
|
||||
@ -2723,11 +2723,7 @@ bool RdbTree::fastLoad ( BigFile *f , RdbMem *stack ) {
|
||||
start ,
|
||||
minUnusedNode ,
|
||||
stack ,
|
||||
|
||||
offset ) ;
|
||||
// just ignore data if we get an error like this for now
|
||||
if ( bytesRead == -2 )
|
||||
break;
|
||||
if ( bytesRead < 0 ) {
|
||||
f->close();
|
||||
if ( m_useProtection ) protect();
|
||||
@ -2890,11 +2886,9 @@ int32_t RdbTree::fastLoadBlock ( BigFile *f ,
|
||||
char *buf = (char *) stack->allocData ( dummy , bufSize , 0 );
|
||||
if ( ! buf ) {
|
||||
log("db: Failed to allocate %"INT32" bytes to read %s. "
|
||||
"Losing data in the tree.",
|
||||
"Increase tree size for it in gb.conf.",
|
||||
bufSize,f->getFilename());
|
||||
// for now just let it pass. assume done
|
||||
return -2;
|
||||
//return -1;
|
||||
return -1;
|
||||
}
|
||||
// debug
|
||||
//log("reading %"INT32" bytes of raw rec data", bufSize );
|
||||
|
Loading…
Reference in New Issue
Block a user