From 9be4c4d3a5098c083fa82f92c35040b997c1600d50d0e5354975e6dceef67fa8 Mon Sep 17 00:00:00 2001 From: AidarKC Date: Sun, 27 Sep 2026 16:50:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BF=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?=D1=81=D0=BC=D0=B5=D0=BD=D1=8B=20=D0=BA=D0=BB=D1=8E=D1=87=D0=B5?= =?UTF-8?q?=D0=B9=20=D0=BF=D1=80=D0=B8=20=D0=BF=D1=83=D1=81=D1=82=D1=8B?= =?UTF-8?q?=D1=85=20=D0=B4=D0=B0=D1=82=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/shine/db/dao/KeyRotationSessionsDAO.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SHiNE-server/shine-server-db/src/main/java/shine/db/dao/KeyRotationSessionsDAO.java b/SHiNE-server/shine-server-db/src/main/java/shine/db/dao/KeyRotationSessionsDAO.java index ab87eb33..7a41afa1 100644 --- a/SHiNE-server/shine-server-db/src/main/java/shine/db/dao/KeyRotationSessionsDAO.java +++ b/SHiNE-server/shine-server-db/src/main/java/shine/db/dao/KeyRotationSessionsDAO.java @@ -234,8 +234,10 @@ public final class KeyRotationSessionsDAO { } long now = System.currentTimeMillis(); - Long completed = next == KeyRotationStatus.COMPLETE ? now : current.getCompletedAtMs(); - Long aborted = next == KeyRotationStatus.ABORTED ? now : current.getAbortedAtMs(); + Long completed = current.getCompletedAtMs(); + if (next == KeyRotationStatus.COMPLETE) completed = now; + Long aborted = current.getAbortedAtMs(); + if (next == KeyRotationStatus.ABORTED) aborted = now; try (PreparedStatement ps = c.prepareStatement(""" UPDATE key_rotation_sessions