[java-plugin-storage-jdbc] 01/02: JJDBC-21 Possible issues with expiration logic

Rod Widdowson rdw at steadingsoftware.com
Wed Aug 23 12:54:16 UTC 2023


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-plugin-storage-jdbc.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-storage-jdbc.git;a=commit;h=5cd64700819a57d133d954b22952b6084d0a91d3

commit 5cd64700819a57d133d954b22952b6084d0a91d3
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Aug 23 13:38:23 2023 +0100

    JJDBC-21 Possible issues with expiration logic
    
    https://shibboleth.atlassian.net/browse/JJDBC-21
    
    Remove edge condition in expiry checking
    
            expires <= now → expired
    
    (used to be <)
---
 .../net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
index ccaac7e..61eadc2 100644
--- a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
+++ b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
@@ -103,11 +103,11 @@ public final class JDBCStorageService extends AbstractStorageService
     static final String DEFAULT_DELETE_RECORD_SQL = "DELETE FROM StorageRecords WHERE context=? AND id=?";
 
     /** The SQL to delete all records by specified expiration.  */
-    static final String DEFAULT_DELETE_BY_EXPIRED_SQL = "DELETE FROM StorageRecords WHERE expires < ? ";
+    static final String DEFAULT_DELETE_BY_EXPIRED_SQL = "DELETE FROM StorageRecords WHERE expires <= ? ";
 
     /** The SQL to delete all records by specified context and expiration.  */
     static final String DEFAULT_DELETE_BY_CONTEXT_EXPIRED_SQL =
-        "DELETE FROM StorageRecords WHERE context = ? AND expires < ?";
+        "DELETE FROM StorageRecords WHERE context = ? AND expires <= ?";
 
     /** The SQL to update the expiration for a given context.  */
     static final String DEFAULT_UPDATE_EXPIRES_BY_CONTEXT_SQL =

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list