Skip to content

Conversation

@charlotteliang
Copy link
Contributor

@charlotteliang charlotteliang commented Oct 10, 2019

The file FIRMessagingRmqManager is essentially calling the same functions of FIRMessagingRmq2PersistentStore, that becomes an unnecessary class layer.
Merging FIRMessagingRmq2PersistentStore into FIRMessagingRmqManager and remove the file FIRMessagingRmq2PersistentStore.

This is a clean up before fixing the issue: b/142357385
We need to move database operations off main thread and by reducing the unnecessary class layer helps us adding async call in the next PR.

minor: remove removeRmqMessagesWithRmqId: method as it's only used in test.

…alling the same functions in FIRMessagingRmq2PersistentStore
@charlotteliang charlotteliang changed the title remove the class FIRMessagingRmqManager remove the class FIRMessagingRmq2PersistentStore Oct 10, 2019
@charlotteliang charlotteliang changed the title remove the class FIRMessagingRmq2PersistentStore Remove the class FIRMessagingRmq2PersistentStore Oct 10, 2019
#if defined(DEBUG)
#define FIRMesssaging_MUST_NOT_BE_MAIN_THREAD() \
do { \
NSAssert(![NSThread isMainThread], @"Must not be executing on the main thread."); \
Copy link
Contributor

Choose a reason for hiding this comment

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

Though it's debug-only, this assert may trigger false-positives if the main GCD queue is suspended. See http://blog.benjamin-encz.de/post/main-queue-vs-main-thread/

Copy link
Contributor Author

@charlotteliang charlotteliang Oct 10, 2019

Choose a reason for hiding this comment

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

Removed it for now. Also realize we don't set DEBUG flag anymore so this would be barely used.

@charlotteliang charlotteliang merged commit 28038e5 into master Oct 10, 2019
@charlotteliang charlotteliang deleted the oct-fcm-database branch October 10, 2019 23:11
@firebase firebase locked and limited conversation to collaborators Nov 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants