@@ -247,20 +247,22 @@ private void logSaltAges(String saltCountType, TargetDate targetDate, Collection
247247 }
248248 }
249249
250- private void logBucketFormatCount (TargetDate targetDate , SaltEntry [] preRotationSalts , SaltEntry [] postRotationSalts ) {
251- int newKeyBucketCounter = 0 , totalKeyBucketCounter = 0 , totalSaltBucketCounter = 0 ;
252250
253- for ( int i = 0 ; i < preRotationSalts . length && i < postRotationSalts . length ; i ++) {
254- var oldSalt = preRotationSalts [ i ];
255- var updatedSalt = postRotationSalts [ i ] ;
251+ /** Logging to monitor migration of buckets from salts to keys **/
252+ private void logBucketFormatCount ( TargetDate targetDate , SaltEntry [] preRotationBuckets , SaltEntry [] postRotationBuckets ) {
253+ int migratedKeyBucketCounter = 0 , totalKeyBucketCounter = 0 , totalSaltBucketCounter = 0 ;
256254
257- if (updatedSalt .currentKey () != null ) totalKeyBucketCounter ++;
258- if (updatedSalt .currentSalt () != null ) totalSaltBucketCounter ++;
259- if (updatedSalt .currentKey () != null && oldSalt .currentSalt () != null ) newKeyBucketCounter ++;
255+ for (int i = 0 ; i < preRotationBuckets .length && i < postRotationBuckets .length ; i ++) {
256+ var oldBucket = preRotationBuckets [i ];
257+ var updatedBucket = postRotationBuckets [i ];
258+
259+ if (updatedBucket .currentKey () != null ) totalKeyBucketCounter ++;
260+ if (updatedBucket .currentSalt () != null ) totalSaltBucketCounter ++;
261+ if (updatedBucket .currentKey () != null && oldBucket .currentSalt () != null ) migratedKeyBucketCounter ++;
260262 }
261263
262- LOGGER .info ("Salt rotation bucket format: target_date={} new_key_bucket_count ={} total_key_bucket_count={} total_salt_bucket_count={}" ,
263- targetDate , newKeyBucketCounter , totalKeyBucketCounter , totalSaltBucketCounter );
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 );
264266 }
265267
266268 @ Getter
0 commit comments