-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nil checks for #462 and #459 #463
base: master
Are you sure you want to change the base?
Changes from all commits
26a7d9c
990ba41
4fa7c0c
ea42a3b
3eb96c0
51263d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1308,6 +1308,13 @@ - (void)insertRowid:(int64_t)rowid collectionKey:(YapCollectionKey *)collectionK | |
|
||
NSString *pageKey = pageMetadata->pageKey; | ||
YapDatabaseViewPage *page = [self pageForPageKey:pageKey]; | ||
|
||
NSAssert(page != nil, @"Missing page in group(%@)", group); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any idea what can lead to this? FWIW we've seen similar crashes, but haven't root-caused it. Hopefully this assert/logging will help track it down... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure, I've never caught it live, only from crash logs |
||
|
||
if (!page) { | ||
YDBLogError(@"Missing page in group(%@)! Error inserting key(%@) collection(%@) in group(%@) at index(%lu) with page(%@) pageOffset(%lu)", group); | ||
return; | ||
} | ||
|
||
YDBLogVerbose(@"Inserting key(%@) collection(%@) in group(%@) at index(%lu) with page(%@) pageOffset(%lu)", | ||
collectionKey.key, collectionKey.collection, group, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation seems off in all these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops