@@ -46,10 +46,10 @@ export class HyperionLifecycleManager {
4646
4747 const indexPartitionSize = this . conf . settings . index_partition_size ;
4848
49- // Must be a multiple of index partition size , round up if necessary
49+ // Must be a multiple of index_partition_size , round up if necessary
5050 if ( this . maxRetainedBlocks % indexPartitionSize !== 0 ) {
51- hLog ( `max_retained_blocks (${ this . maxRetainedBlocks } ) is not a multiple of index partition size (${ indexPartitionSize } ).` ) ;
52- hLog ( `Adjusting max_retained_blocks to be a multiple of index partition size .` ) ;
51+ hLog ( `max_retained_blocks (${ this . maxRetainedBlocks } ) is not a multiple of index_partition_size (${ indexPartitionSize } ).` ) ;
52+ hLog ( `Adjusting max_retained_blocks to be a multiple of index_partition_size .` ) ;
5353 this . maxRetainedBlocks += ( indexPartitionSize - ( this . maxRetainedBlocks % indexPartitionSize ) ) ;
5454 }
5555 }
@@ -160,7 +160,6 @@ export class HyperionLifecycleManager {
160160 }
161161
162162 hLog ( `Auto pruning completed.` ) ;
163- await this . master . ioRedisClient . del ( `${ this . manager . chain } ::fib` ) ;
164163 }
165164
166165 private attributesToObject ( attributes : NodeAttributeRequirement [ ] ) : { [ key : string ] : string } {
@@ -375,6 +374,8 @@ export class HyperionLifecycleManager {
375374 hLog ( `Task ID: ${ deleteResponse . task } ` ) ;
376375 if ( deleteResponse . task && typeof deleteResponse . task === 'string' ) {
377376 await this . startMonitoringDeleteTask ( deleteResponse . task ) ;
377+ } else {
378+ await this . master . ioRedisClient . del ( `${ this . manager . chain } ::fib` ) ;
378379 }
379380 } else {
380381 hLog ( `No blocks found to prune in index ${ blockIndices [ 0 ] . index } .` ) ;
@@ -388,8 +389,10 @@ export class HyperionLifecycleManager {
388389 }
389390
390391 async startMonitoringDeleteTask ( task : string ) {
392+
391393 if ( ! task ) {
392394 hLog ( `No task ID provided for monitoring.` ) ;
395+ await this . master . ioRedisClient . del ( `${ this . manager . chain } ::fib` ) ;
393396 return ;
394397 }
395398
@@ -401,6 +404,7 @@ export class HyperionLifecycleManager {
401404 } ) ;
402405 if ( taskInfo . completed ) {
403406 hLog ( `Delete task ${ task } completed.` ) ;
407+ await this . master . ioRedisClient . del ( `${ this . manager . chain } ::fib` ) ;
404408 } else {
405409 hLog ( `Delete task ${ task } is still running...` ) ;
406410 setTimeout ( checkTaskStatus , 5000 ) ;
0 commit comments