Add logging around database transactions and group recipient creation.

This commit is contained in:
Greyson Parrelli 2023-10-30 09:36:20 -04:00
parent b8d229e58e
commit ea0c3dbe5a
2 changed files with 4 additions and 0 deletions

View file

@ -607,6 +607,8 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
Log.w(TAG, "Failed to update newly-created record for $recipientId") Log.w(TAG, "Failed to update newly-created record for $recipientId")
} }
Log.i(TAG, "Group $groupId was newly-inserted as $recipientId")
return recipientId return recipientId
} }
} }

View file

@ -393,6 +393,7 @@ class IncomingMessageObserver(private val context: Application) {
GroupsV2ProcessingLock.acquireGroupProcessingLock().use { GroupsV2ProcessingLock.acquireGroupProcessingLock().use {
ReentrantSessionLock.INSTANCE.acquire().use { ReentrantSessionLock.INSTANCE.acquire().use {
batch.forEach { batch.forEach {
Log.d(TAG, "Beginning database transaction...")
SignalDatabase.runInTransaction { SignalDatabase.runInTransaction {
val followUpOperations: List<FollowUpOperation>? = processEnvelope(bufferedStore, it.envelope, it.serverDeliveredTimestamp) val followUpOperations: List<FollowUpOperation>? = processEnvelope(bufferedStore, it.envelope, it.serverDeliveredTimestamp)
bufferedStore.flushToDisk() bufferedStore.flushToDisk()
@ -401,6 +402,7 @@ class IncomingMessageObserver(private val context: Application) {
ApplicationDependencies.getJobManager().addAll(jobs) ApplicationDependencies.getJobManager().addAll(jobs)
} }
} }
Log.d(TAG, "Ended database transaction.")
signalWebSocket.sendAck(it) signalWebSocket.sendAck(it)
} }
} }