I ran into a situation where writes are blocked because a long read was being done in the primary connection. Looking at the code, I saw that when the 9 read connections are all in use, the primary connection will be used for the next read if it's available.
// Try to acquire a connection.
SQLiteConnection connection = null;
if (!wantPrimaryConnection) {
connection = tryAcquireNonPrimaryConnectionLocked(
sql, connectionFlags); // might throw
}
if (connection == null) {
connection = tryAcquirePrimaryConnectionLocked(connectionFlags); // might throw
}
if (connection != null) {
return connection;
}
This might cause an expensive query to block writes to the db. Is this the expected behavior?
I ran into a situation where writes are blocked because a long read was being done in the primary connection. Looking at the code, I saw that when the 9 read connections are all in use, the primary connection will be used for the next read if it's available.
This might cause an expensive query to block writes to the db. Is this the expected behavior?