fix crawl delay wait queue logic.

if coll already exists trying to add, let it be. don't error out.
This commit is contained in:
Matt Wells 2013-12-27 14:35:51 -08:00
parent d8a9a3f4e3
commit 6aac48e487
3 changed files with 15 additions and 10 deletions

@ -306,9 +306,11 @@ bool Collectiondb::addNewColl ( char *coll ,
// ensure does not already exist in memory
if ( getCollnum ( coll ) >= 0 ) {
g_errno = EEXIST;
char *xx=NULL;*xx=0;
return log("admin: Trying to create collection \"%s\" but "
"already exists in memory.",coll);
log("admin: Trying to create collection \"%s\" but "
"already exists in memory.",coll);
// just let it pass...
g_errno = 0 ;
return true;
}
// MDW: ensure not created on disk since time of last load
char dname[512];

@ -2190,17 +2190,19 @@ void gotIframeExpandedContent ( void *state ) {
// we respect crawl delay for sure
void scanHammerQueue ( int fd , void *state ) {
Msg13Request *r = s_hammerQueueHead;
if ( ! r ) return;
if ( ! s_hammerQueueHead ) return;
long long nowms = gettimeofdayInMilliseconds();
top:
Msg13Request *r = s_hammerQueueHead;
if ( ! r ) return;
Msg13Request *prev = NULL;
long long waited = -1LL;
Msg13Request *nextLink = NULL;
// scan down the linked list of queued of msg13 requests
for ( ; r ; prev = r , r = nextLink ) {

@ -18141,11 +18141,12 @@ bool Parms::updateParm ( char *rec , WaitEntry *we ) {
sb->safeMemcpy ( data , dataSize );
// ensure null terminated
sb->nullTerm();
return true;
//return true;
}
else {
// and copy the data into collrec or g_conf
memcpy ( dst , data , dataSize );
}
// and copy the data into collrec or g_conf
memcpy ( dst , data , dataSize );
SafeBuf val2;
parm->printVal ( &val2 , collnum , occNum );