Skip to content

Commit 81e1ce2

Browse files
committed
Rename ReadyOrNotReady
1 parent c5915c8 commit 81e1ce2

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

go/pkg/sysdb/coordinator/task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (s *Coordinator) AttachFunction(ctx context.Context, req *coordinatorpb.Att
9292
err := s.catalog.txImpl.Transaction(ctx, func(txCtx context.Context) error {
9393
// Check if there's any active (ready, non-deleted) attached function for this collection
9494
// We only allow one active attached function per collection
95-
existingAttachedFunctions, err := s.catalog.metaDomain.AttachedFunctionDb(txCtx).GetAnyByCollectionID(req.InputCollectionId)
95+
existingAttachedFunctions, err := s.catalog.metaDomain.AttachedFunctionDb(txCtx).GetReadyOrNonReadyByCollectionID(req.InputCollectionId)
9696
if err != nil {
9797
log.Error("AttachFunction: failed to check for existing attached function", zap.Error(err))
9898
return err

go/pkg/sysdb/metastore/db/dbmodel/mocks/IAttachedFunctionDb.go

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/pkg/sysdb/metastore/db/dbmodel/task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type IAttachedFunctionDb interface {
4242
GetByID(id uuid.UUID) (*AttachedFunction, error)
4343
GetAnyByID(id uuid.UUID) (*AttachedFunction, error) // TODO(tanujnay112): Consolidate all the getters.
4444
GetByCollectionID(inputCollectionID string) ([]*AttachedFunction, error)
45-
GetAnyByCollectionID(inputCollectionID string) ([]*AttachedFunction, error)
45+
GetReadyOrNonReadyByCollectionID(inputCollectionID string) ([]*AttachedFunction, error)
4646
Update(attachedFunction *AttachedFunction) error
4747
Finish(id uuid.UUID) error
4848
SoftDelete(inputCollectionID string, name string) error

0 commit comments

Comments
 (0)