Skip to content

Commit

Permalink
fix: bucket can be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgao001 committed May 12, 2024
1 parent 0537c3c commit 4db2e55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modular/manager/bucket_migrate_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,10 @@ func (s *BucketMigrateScheduler) confirmCompleteTxEvents(ctx context.Context, ev
log.Errorw("failed to get bucket by bucket id", "bucket_id", bucketID, "error", err)
return
}

if bucket == nil {
log.Errorw("can not find bucket info", "bucket_id", bucketID, "error", err)
return
}
if bucket.BucketInfo.GetBucketStatus() == storagetypes.BUCKET_STATUS_CREATED {
if err = UpdateBucketMigrationProgress(s.manager.baseApp, bucketID, storetypes.BucketMigrationState_BUCKET_MIGRATION_STATE_WAIT_COMPLETE_TX_EVENT_DONE); err != nil {
return
Expand Down

0 comments on commit 4db2e55

Please sign in to comment.