mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
Integrate merge request feedback
This commit is contained in:
@@ -89,7 +89,6 @@ class H2Database extends JdbcDatabase {
|
||||
c = createConnection();
|
||||
super.closeAllConnections();
|
||||
setDirty(c, false);
|
||||
c.commit();
|
||||
c.close();
|
||||
} catch (SQLException e) {
|
||||
tryToClose(c, LOG, WARNING);
|
||||
|
||||
@@ -82,7 +82,6 @@ class HyperSqlDatabase extends JdbcDatabase {
|
||||
super.closeAllConnections();
|
||||
c = createConnection();
|
||||
setDirty(c, false);
|
||||
c.commit();
|
||||
s = c.createStatement();
|
||||
s.executeQuery("SHUTDOWN");
|
||||
s.close();
|
||||
|
||||
@@ -355,13 +355,13 @@ abstract class JdbcDatabase implements Database<Connection> {
|
||||
@GuardedBy("connectionsLock")
|
||||
private boolean closed = false;
|
||||
|
||||
private boolean wasDirtyOnInitialisation = false;
|
||||
private volatile boolean wasDirtyOnInitialisation = false;
|
||||
|
||||
protected abstract Connection createConnection()
|
||||
throws DbException, SQLException;
|
||||
|
||||
// Used exclusively during open to compact the database after schema
|
||||
// migrations and after DatabaseConstants#MAX_COMPACTION_INTERVAL_MS has
|
||||
// migrations or after DatabaseConstants#MAX_COMPACTION_INTERVAL_MS has
|
||||
// elapsed
|
||||
protected abstract void compactAndClose() throws DbException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user