goharbor/harbor · error
failed to wait the execution record to be inserted: %v
Error message
failed to wait the execution record to be inserted: %v
What it means
Error "failed to wait the execution record to be inserted: %v" thrown in goharbor/harbor.
Source
Thrown at src/controller/replication/execution.go:166
c.wp.GetWorker()
defer c.wp.ReleaseWorker()
ctx := orm.NewContext(context.Background(), c.ormCreator.Create())
// recover in case panic during the adapter process
defer func() {
if err := recover(); err != nil {
logger.Errorf("recovered from the panic: %v", err)
c.markError(ctx, id, fmt.Errorf("panic during the process"))
}
}()
// as we start a new transaction in the goroutine, the execution record may not
// be inserted yet, wait until it is ready before continue
if err := retry.Retry(func() error {
_, err := c.execMgr.Get(ctx, id)
return err
}); err != nil {
c.markError(ctx, id, fmt.Errorf(
"failed to wait the execution record to be inserted: %v", err))
return
}
err := c.flowCtl.Start(ctx, id, policy, resource)
if err == nil {
// no err, return directly
return
}
c.markError(ctx, id, err)
}()
return id, nil
}
func (c *controller) markError(ctx context.Context, executionID int64, err error) {
logger := log.GetLogger(ctx)
// try to stop the execution first in case that some tasks are already created
if e := c.execMgr.StopAndWaitWithError(ctx, executionID, 10*time.Second, err); e != nil {View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/controller/replication/execution.go:166 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/50b36b962b9fb4ac.
Report an issue: GitHub.