Revision 8d76e2e3 ChatSecure/Classes/Model/Yap Storage/SecondaryIndexes.swift
| ChatSecure/Classes/Model/Yap Storage/SecondaryIndexes.swift | ||
|---|---|---|
| 202 | 202 |
if matchingBuddies.count > 1 {
|
| 203 | 203 |
DDLogWarn("WARN: More than one OTRXMPPBuddy matching query \(query) \(jid) \(accountUniqueId): \(matchingBuddies.count)")
|
| 204 | 204 |
} |
| 205 |
#if DEBUG |
|
| 206 |
if matchingBuddies.count == 0 {
|
|
| 207 |
DDLogWarn("WARN: No OTRXMPPBuddy matching query \(jid) \(accountUniqueId)")
|
|
| 208 |
let buddy = slowLookup(jid: jid, accountUniqueId: accountUniqueId, transaction: transaction) |
|
| 209 |
if buddy != nil {
|
|
| 210 |
DDLogWarn("WARN: Found buddy using O(n) lookup that wasn't found in secondary index: \(jid) \(accountUniqueId)")
|
|
| 211 |
} |
|
| 212 |
} |
|
| 213 |
#endif |
|
| 205 |
// #if DEBUG
|
|
| 206 |
// if matchingBuddies.count == 0 {
|
|
| 207 |
// DDLogWarn("WARN: No OTRXMPPBuddy matching query \(jid) \(accountUniqueId)")
|
|
| 208 |
// let buddy = slowLookup(jid: jid, accountUniqueId: accountUniqueId, transaction: transaction)
|
|
| 209 |
// if buddy != nil {
|
|
| 210 |
// DDLogWarn("WARN: Found buddy using O(n) lookup that wasn't found in secondary index: \(jid) \(accountUniqueId)")
|
|
| 211 |
// }
|
|
| 212 |
// }
|
|
| 213 |
// #endif
|
|
| 214 | 214 |
return matchingBuddies.first |
| 215 | 215 |
} |
| 216 | 216 |
} |
Also available in: Unified diff