ZimbraLog.mailbox.warn("could not delete all index entries for items: " + deleted.itemIds);
ZimbraLog.mailbox.warn("could not delete all index entries for items: " + deleted.itemIds.getAll());
    private void commitCache(MailboxChange change) {        if (change == null)            return;        // save for notifications (below)        PendingModifications dirty = null;        if (change.mDirty != null && change.mDirty.hasNotifications()) {            dirty = change.mDirty;            change.mDirty = new PendingModifications();        }        try {            // the mailbox data has changed, so commit the changes            if (change.sync != null)                mData.trackSync = change.sync;            if (change.imap != null)                mData.trackImap = change.imap;            if (change.size != MailboxChange.NO_CHANGE)                mData.size = change.size;            if (change.itemId != MailboxChange.NO_CHANGE)                mData.lastItemId = change.itemId;            if (change.contacts != MailboxChange.NO_CHANGE)                mData.contacts = change.contacts;            if (change.changeId != MailboxChange.NO_CHANGE && change.changeId > mData.lastChangeId) {                mData.lastChangeId   = change.changeId;                mData.lastChangeDate = change.timestamp;            }            if (change.config != null) {                if (change.config.getSecond() == null) {                    if (mData.configKeys != null)                        mData.configKeys.remove(change.config.getFirst());                } else {                    if (mData.configKeys == null)                        mData.configKeys = new HashSet<String>(1);                    mData.configKeys.add(change.config.getFirst());                }            }            // accumulate all the info about deleted items; don't care about committed changes to external items            MailItem.PendingDelete deleted = null;            for (Object obj : change.mOtherDirtyStuff)                if (obj instanceof MailItem.PendingDelete)                    deleted = ((MailItem.PendingDelete) obj).add(deleted);            // delete any index entries associated with items deleted from db            if (deleted != null && deleted.indexIds != null && deleted.indexIds.size() > 0)                try {                    int[] indexIds = new int[deleted.indexIds.size()];                    for (int i = 0; i < deleted.indexIds.size(); i++)                        indexIds[i] = deleted.indexIds.get(i);                    int[] deletedIds = getMailboxIndex().deleteDocuments(indexIds);                    if (deletedIds != indexIds)                        ZimbraLog.mailbox.warn("could not delete all index entries for items: " + deleted.itemIds);                } catch (IOException e) {                    ZimbraLog.mailbox.warn("ignoring error while deleting index entries for items: " + deleted.itemIds, e);                }                                // delete any blobs associated with items deleted from db/index                StoreManager sm = StoreManager.getInstance();                if (deleted != null && deleted.blobs != null)                    for (MailboxBlob blob : deleted.blobs)                        try {                            sm.delete(blob);                        } catch (IOException e) {                            ZimbraLog.mailbox.warn("could not delete blob " + blob.getPath() + " during commit");                        }        } catch (RuntimeException e) {            ZimbraLog.mailbox.error("ignoring error during cache commit", e);        } finally {            // keep our MailItem cache at a reasonable size            trimItemCache();            // make sure we're ready for the next change            change.reset();        }        // committed changes, so notify any listeners        if (!mListeners.isEmpty() && dirty != null && dirty.hasNotifications())            for (Session session : new ArrayList<Session>(mListeners))                try {                    session.notifyPendingChanges(dirty);                } catch (RuntimeException e) {                    ZimbraLog.mailbox.error("ignoring error during notification", e);                }    }