Hi,

I'm writing a method for macOS and iOS using CBL 1.4.1 which purges all the 
deleted documents in the database.

But when I run my code, it looks like all the calls to purgeDocument are 
creating and committing its own transactions, even though I've surrounded 
the purgeDocument call within a CBLDatabase inTransaction block.

I thought that only the one transaction would be created.

This is the output I'm seeing:

*03:13:26.782*‖* Database: }} Commit transaction (level 2)*

*03:13:26.795*‖* Database: {{ Begin transaction (level 2)...*

*03:13:26.795*‖* Database: Purging doc 
'rec-f2d55a0bb90149f69e95ba4fe0c38f91'*

*03:13:26.796*‖* Database: ---> Added: (null) as seq 0*

*03:13:26.796*‖* Database: }} Commit transaction (level 2)*

*03:13:26.796*‖* Database: {{ Begin transaction (level 2)...*

*03:13:26.796*‖* Database: Purging doc 
'rec-f2d60a9d4f3d4fb688d4a0609f9a4eeb'*

*03:13:26.797*‖* Database: ---> Added: (null) as seq 0*

*03:13:26.797*‖* Database: }} Commit transaction (level 2)*

*03:13:26.798*‖* Database: {{ Begin transaction (level 2)...*

*03:13:26.798*‖* Database: Purging doc 
'rec-f2d6429208da44c8b66fe7ace7b1467f'*

*03:13:26.799*‖* Database: ---> Added: (null) as seq 0*

I see it says Level 2 though, so does that mean that the main transaction 
(Level 1) was created by the inTransaction call and these are just 
sub-transactions of that one transaction?

Is there a way to prevent the sub-transactions from being created and 
committed for every purgeDocument call? It's operating quite slowly with 
all these transactions.

Is it possible that the purgeDocument code creates its own transaction?

Thanks,

Brendan

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/3de9e62d-b59b-4bed-856e-d53763affb1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to