[DB023] Database closing and continuous replication

Cruising on:
SGW 2.0 beta2
CBS 5.5 beta
CBL db023

I was wondering how the closing of database work during replication. As far as we understand continuous replication is something we can start at anytime. If after this there is some new input in CBS bucket (remote) or CBL (local) it get picked up automatically and synced.

But when we start continous replication and want to acces a CBL database we get the error that the database is in use. We made sure the database isn’t left open elsewhere… .

when we start continous replication and want to acces a CBL database we get the error that the database is in use.

Could you describe this in more detail? It shouldn’t be happening.

Hi,

Very strange, we don’t have the error anymore. We replicate the buckets in sequence. Every second time it hangs randomly at the replication of one bucket. Stat stays busy.

When I stop a continuous replication and want to delete a database I get an error

CouchbaseLiteException (LiteCoreDomain / 24): Can't delete db file while other connections are open.

I get a message that there are 10-12 connections open! Is there a way to force closing all curent connections?

This is is planned for 2.1
https://github.com/couchbase/couchbase-lite-ios/issues/2043 . (We used to close active replicators on close but then removed it for reasons discussed in the ticket) . @jens , @borrrden can comment on options to force close the connections …

1 Like

There is no way to force close all connections because they do not have a centralized way of knowing about each other. Just remember to close all database handlers and stop all replicators, as those are what keep those sorts of connections open. If that proves difficult then let us know about a scenario in which it is confusing so that we can potentially address it.

1 Like

Yes but that’s the thing: I stop all current replications and close all databases. If I don’t find it Today I’ll elaborate on it tomorrow,

thanks for your support

As my goal is/was to just delete all data in the databases I just get the path and delete the directory the db is in. Works for now

1 Like