@@ -250,19 +250,22 @@ private void logSaltAges(String saltCountType, TargetDate targetDate, Collection
250250
251251 /** Logging to monitor migration of buckets from salts (old format - v2/v3) to encryption keys (new format - v4) **/
252252 private void logBucketFormatCount (TargetDate targetDate , SaltEntry [] preRotationBuckets , SaltEntry [] postRotationBuckets ) {
253- int migratedKeyBucketCounter = 0 , totalKeyBucketCounter = 0 , totalSaltBucketCounter = 0 ;
253+ int migratedKeyBuckets = 0 , totalKeys = 0 , totalSalts = 0 , totalPreviousKeys = 0 , totalPreviousSalts = 0 ;
254254
255255 for (int i = 0 ; i < preRotationBuckets .length && i < postRotationBuckets .length ; i ++) {
256256 var oldBucket = preRotationBuckets [i ];
257257 var updatedBucket = postRotationBuckets [i ];
258258
259- if (updatedBucket .currentKey () != null ) totalKeyBucketCounter ++;
260- if (updatedBucket .currentSalt () != null ) totalSaltBucketCounter ++;
261- if (updatedBucket .currentKey () != null && oldBucket .currentSalt () != null ) migratedKeyBucketCounter ++;
259+ if (updatedBucket .currentKey () != null ) totalKeys ++;
260+ if (updatedBucket .currentSalt () != null ) totalSalts ++;
261+ if (updatedBucket .previousKey () != null ) totalPreviousKeys ++;
262+ if (updatedBucket .previousSalt () != null ) totalPreviousSalts ++;
263+ if (updatedBucket .currentKey () != null && oldBucket .currentSalt () != null ) migratedKeyBuckets ++;
262264 }
263265
264- LOGGER .info ("Rotation bucket format: target_date={} migrated_key_bucket_count={} total_key_bucket_count={} total_salt_bucket_count={}" ,
265- targetDate , migratedKeyBucketCounter , totalKeyBucketCounter , totalSaltBucketCounter );
266+ LOGGER .info ("UID bucket format: target_date={} migrated_key_bucket_count={} total_key_bucket_count={} total_salt_bucket_count={} " +
267+ "total_previous_key_count={} total_previous_salt_count={}" ,
268+ targetDate , migratedKeyBuckets , totalKeys , totalSalts , totalPreviousKeys , totalPreviousSalts );
266269 }
267270
268271 @ Getter
0 commit comments