192_group_profit_control.sql 575 B

123456789
  1. -- Per-group profit control for scheduling admission.
  2. -- Admission rule at request time: an account qualifies iff its cost multiplier
  3. -- U (accounts.rate_multiplier) satisfies U <= D * (1 - margin - buffer), where
  4. -- D is the requester's effective downstream multiplier at the request's
  5. -- pricing instant.
  6. ALTER TABLE groups
  7. ADD COLUMN IF NOT EXISTS profit_control_enabled BOOLEAN NOT NULL DEFAULT FALSE,
  8. ADD COLUMN IF NOT EXISTS profit_min_margin DECIMAL(10,4) NOT NULL DEFAULT 0,
  9. ADD COLUMN IF NOT EXISTS profit_safety_buffer DECIMAL(10,4) NOT NULL DEFAULT 0;