Skip to content
Snippets Groups Projects
Commit 9dd35e29 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Re-add missing COMMIT commands to bwhist module.

Last month, in commit f8fa108d where we modernized the legacy module
and renamed it to bwhist, we split up the closeConnection() into one
method commit() to commit changes and another method closeConnection()
to close the connection. However, we somehow forgot to invoke the
commit() method.

This had two effects:

 1. Newly added data was not made persistent in the database. This
    lead to a moving window of roughly one week for new data and an
    increasing gap between the last committed data and this 1-week
    window.

 2. The result of aggregating newly added data was not made
    persistent. So, even after fixing the first issue above, we
    accumulated newly added data, rather than only keeping the most
    recent two weeks. This made the database slower over time.

This change adds two commit() calls at the right places.
parent 59b800a4
Branches
Tags
No related merge requests found
......@@ -532,6 +532,7 @@ public final class RelayDescriptorDatabaseImporter {
this.addExtraInfoDescriptor((ExtraInfoDescriptor) descriptor);
}
}
this.commit();
reader.saveHistoryFile(this.historyFile);
}
......@@ -615,6 +616,7 @@ public final class RelayDescriptorDatabaseImporter {
void aggregate() throws SQLException {
Statement st = this.conn.createStatement();
st.executeQuery("SELECT refresh_all()");
this.commit();
}
/** Query the servers_platforms view. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment