From 386ccb6749d0f3be90d22c9f31e9749fb439ab2c Mon Sep 17 00:00:00 2001 From: alexhudson Date: Fri, 20 Aug 2010 09:27:33 +0000 Subject: [PATCH] * Don't error out on missing conversations * Extra logging debugging --- src/agents/store/command.c | 7 +++---- src/agents/store/locking.c | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/agents/store/command.c b/src/agents/store/command.c index f40cf80..b39eac5 100644 --- a/src/agents/store/command.c +++ b/src/agents/store/command.c @@ -1644,8 +1644,8 @@ StoreCommandCOPY(StoreClient *client, StoreObject *object, StoreObject *collecti /* release the [xy]locks */ //FIXME: Store level lock!! - LogicalLockRelease(client, yObject, yLock, "StoreCommandCOPY"); - //LogicalLockRelease(client, xObject, xLock, "StoreCommandCOPY"); + //LogicalLockRelease(client, yObject, yLock, "StoreCommandCOPY"); + LogicalLockRelease(client, xObject, xLock, "StoreCommandCOPY"); xLock = yLock = LLOCK_NONE; ++client->stats.insertions; @@ -1835,9 +1835,8 @@ StoreCommandDELETE(StoreClient *client, StoreObject *object) case STORE_DOCTYPE_MAIL: // check to see if we can remove this document from a conversation if (StoreObjectUnlinkFromConversation(client, object)) { - LogicalLockRelease(client, &collection, LLOCK_READWRITE, "StoreCommandDELETE"); + // log the error, but don't fail on it Log(LOG_ERROR, "DELETE: Unable to unlink conversations from " GUID_FMT, object->guid); - return ConnWriteStr(client->conn, MSG5005DBLIBERR); } break; case STORE_DOCTYPE_CALENDAR: diff --git a/src/agents/store/locking.c b/src/agents/store/locking.c index bc87350..b6fa3bf 100644 --- a/src/agents/store/locking.c +++ b/src/agents/store/locking.c @@ -62,6 +62,8 @@ LogicalLockGain(StoreClient *client, StoreObject *object, LogicalLockType type, UNUSED_PARAMETER(location); UNUSED_PARAMETER(object); + Log(LOG_DEBUG, "%lu asking for lock on %s in %s", XplGetThreadID(), client->storeName, location); + XplMutexLock(logicallock_global); if (!g_hash_table_lookup_extended(storelocks_global, client->storeName, &orig_key, &sl_tmp)) { /* it must not exist, create it first. i can lock it too since this is new. */