Skip to content

Commit

Permalink
Simplify GetActiveLogIDs invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
pav-kv committed Jun 18, 2021
1 parent aa82e04 commit ab287d2
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions log/operation_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,6 @@ func NewOperationManager(info OperationInfo, logOperation Operation) *OperationM
}
}

// getActiveLogIDs returns IDs of logs eligible for sequencing.
func (o *OperationManager) getActiveLogIDs(ctx context.Context) ([]int64, error) {
logIDs, err := o.info.Registry.LogStorage.GetActiveLogIDs(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get active logIDs: %v", err)
}
return logIDs, nil
}

// logName maps a logID to a human-readable name, caching results along the way.
// The human-readable name may non-unique so should only be used for diagnostics.
func (o *OperationManager) logName(ctx context.Context, logID int64) string {
Expand Down Expand Up @@ -304,7 +295,7 @@ func (o *OperationManager) getLogsAndExecutePass(ctx context.Context) error {
runCtx, cancel := context.WithTimeout(ctx, o.info.Timeout)
defer cancel()

activeIDs, err := o.getActiveLogIDs(runCtx)
activeIDs, err := o.info.Registry.LogStorage.GetActiveLogIDs(ctx)
if err != nil {
return fmt.Errorf("failed to list active log IDs: %v", err)
}
Expand Down

0 comments on commit ab287d2

Please sign in to comment.