Skip to content
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

Fix CoreData concurrency #1026

Merged
merged 12 commits into from
Apr 28, 2021
Merged

Fix CoreData concurrency #1026

merged 12 commits into from
Apr 28, 2021

Conversation

olejnjak
Copy link
Contributor

@olejnjak olejnjak commented Apr 28, 2021

This PR fixes CoreData concurrency issues found by enabling -com.apple.CoreData.ConcurrencyDebug launch argument for demo app and for StreamChat test plans.

  • I kept the launch argument for demo app and for both LLC test plans as I think it is useful to know about those issues
  • fix issues in demo app
  • fix issues in LLC tests

Closes #954

@olejnjak olejnjak self-assigned this Apr 28, 2021
@codecov
Copy link

codecov bot commented Apr 28, 2021

Codecov Report

Merging #1026 (6669f34) into main (f23f8eb) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1026      +/-   ##
==========================================
+ Coverage   89.97%   89.99%   +0.02%     
==========================================
  Files         213      214       +1     
  Lines        8986     9006      +20     
==========================================
+ Hits         8085     8105      +20     
  Misses        901      901              
Flag Coverage Δ
llc-tests 89.82% <100.00%> (+0.02%) ⬆️
llc-tests-ios12 86.63% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...treamChat/Controllers/EntityDatabaseObserver.swift 100.00% <100.00%> (ø)
.../StreamChat/Controllers/ListDatabaseObserver.swift 93.45% <100.00%> (+0.28%) ⬆️
...ources/StreamChat/Database/DatabaseContainer.swift 97.03% <100.00%> (+0.13%) ⬆️
...at/Workers/Background/NewChannelQueryUpdater.swift 88.88% <100.00%> (+0.17%) ⬆️
...mChatTestTools/NSManagedObject+ContextChange.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f23f8eb...6669f34. Read the comment docs.

@olejnjak olejnjak force-pushed the fix_core_data_concurrency branch from f118df2 to ee0b434 Compare April 28, 2021 07:07
Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ✅ Thanks, didn't realise this flag wasn't ON already, it is very useful 👍

Copy link
Contributor

@VojtaStavik VojtaStavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍 Just some minor changes and ergonomy tweaks.

@olejnjak olejnjak force-pushed the fix_core_data_concurrency branch from 7fc5816 to 1f0baa9 Compare April 28, 2021 10:46
@olejnjak olejnjak force-pushed the fix_core_data_concurrency branch from 1f0baa9 to 6669f34 Compare April 28, 2021 10:54
@olejnjak olejnjak requested a review from VojtaStavik April 28, 2021 10:56
@VojtaStavik VojtaStavik merged commit 0335caf into main Apr 28, 2021
@VojtaStavik VojtaStavik deleted the fix_core_data_concurrency branch April 28, 2021 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chat Client crashes upon initialization
3 participants