File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ func pollLatest() error {
1717 // Initialize metrics labels
1818 chainIdStr := libs .ChainIdStr
1919 indexerName := config .Cfg .ZeetProjectName
20- isRightsizing := false
20+ hasRightsized := false
2121
2222 for {
2323 latestBlock , err := libs .RpcClient .GetLatestBlockNumber (context .Background ())
@@ -76,13 +76,13 @@ func pollLatest() error {
7676 nextBlockNumber = expectedBlockNumber
7777 metrics .CommitterNextBlockNumber .WithLabelValues (indexerName , chainIdStr ).Set (float64 (nextBlockNumber ))
7878
79- if ! config .Cfg .CommitterIsLive && latestBlock .Int64 ()- int64 (nextBlockNumber ) < 20 && ! isRightsizing {
80- isRightsizing = true
79+ if ! config .Cfg .CommitterIsLive && latestBlock .Int64 ()- int64 (nextBlockNumber ) < 20 && ! hasRightsized {
8180 log .Debug ().
8281 Uint64 ("latest_block" , latestBlock .Uint64 ()).
8382 Uint64 ("next_commit_block" , nextBlockNumber ).
8483 Msg ("Latest block is close to next commit block. Resizing s3 committer" )
8584 libs .RightsizeS3Committer ()
85+ hasRightsized = true
8686 }
8787 }
8888}
You can’t perform that action at this time.
0 commit comments