Storing a new secret can cause more than one old secret to expire.

This depends on the (unspecified) order in which new secrets are stored.
For example, if the secrets for periods 0 - 2 are loaded in period 3,
the secrets for periods 3 and 4 will be stored; the secrets for periods
0 and 1 may expire separately if the secret for period 3 is stored
before the secret for period 4, or together if the secret for period 4
is stored before the secret for period 3.
This commit is contained in:
akwizgran
2013-04-15 11:20:59 +01:00
parent da7657ff4d
commit 5a365f6ce9

View File

@@ -879,9 +879,6 @@ abstract class JdbcDatabase implements Database<Connection> {
batchAffected = ps.executeBatch();
if(batchAffected.length != secrets.size())
throw new DbStateException();
for(int i = 0; i < batchAffected.length; i++) {
if(batchAffected[i] > 1) throw new DbStateException();
}
ps.close();
} catch(SQLException e) {
tryToClose(ps);