MCPcopy Create free account
hub / github.com/brimdata/super / RemovePool

Method RemovePool

db/root.go:347–360  ·  view source on GitHub ↗

RemovePool deletes a pool from the configuration journal and deletes all data associated with the pool.

(ctx context.Context, id ksuid.KSUID)

Source from the content-addressed store, hash-verified

345// RemovePool deletes a pool from the configuration journal and deletes all
346// data associated with the pool.
347func (r *Root) RemovePool(ctx context.Context, id ksuid.KSUID) error {
348 config, err := r.pools.LookupByID(ctx, id)
349 if err != nil {
350 return err
351 }
352 if err := r.pools.Remove(ctx, *config); err != nil {
353 return err
354 }
355 // This pool might be cached on other cluster nodes, but that's fine.
356 // With no entry in the pool store, it will be inaccessible and
357 // eventually evicted by the cache's LRU algorithm.
358 r.poolCache.Remove(config.ID)
359 return RemovePool(ctx, r.engine, r.path, config)
360}
361
362func (r *Root) CreateBranch(ctx context.Context, poolID ksuid.KSUID, name string, parent ksuid.KSUID) (*branches.Config, error) {
363 config, err := r.pools.LookupByID(ctx, poolID)

Callers

nothing calls this directly

Calls 3

RemovePoolFunction · 0.85
LookupByIDMethod · 0.80
RemoveMethod · 0.45

Tested by

no test coverage detected