feat(phase-15): storage cost — raw lifecycle, pgbouncer, updated_at, dash - #41
Merged
Conversation
Add pgbouncer service in transaction mode with pool tuning, minio-setup ilm rule for raw/ 7d expiry via mc ilm rule add, videos.updated_at column with trigger and migration 000003, nginx-vod dash location and hls mapping fix, env KEEP_RAW and pgbouncer pool vars in .env.example.
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #16
Closes #17
Closes #18
Summary
Phase 15 P2 cost/storage: lifecycle для
raw/, PgBouncer перед postgres,videos.updated_at, DASH + FE standalone.pgbouncer:6432(transactiondefault_pool_size 20)deploy/docker-compose.yml:18, healthcheck viapsql, postgresmd5(password_encryption=md5) для совместимостиminio-setupmc ilm rule add --expire-days 7 --prefix raw/deploy/docker-compose.yml:89(провереноmc ilm ls raw/ 7) + transcoderKEEP_RAW=falseservices/transcoder/app/consumer.py:43сразуRemoveObjectпослеreadyтолько при успехеupdate_status000003_add_updated_at+ triggerdeploy/postgres/init.sql:38,model.Video.UpdatedAtservices/metadata/internal/model/video.go:38authservices/auth/src/core/db.py:28statement_cache_size=0+ реврайтpostgres->pgbouncer,metadataservices/metadata/cmd/server/main.go:47QueryExecModeSimpleProtocolvod dashdeploy/nginx/nginx.conf:68+ fix mappinghls/|dash/output: standalonefrontend/next.config.mjs:3,VideoPlayer maxBufferLengthсохраненAcceptance
KEEP_RAWimmediate delete +videos.updated_at(mc ilm lsok, 4 теста)psql -h pgbouncer -p 5432ok,docker ps healthy)Dockerfilemulti-stage),maxBufferLength:10сохраненVerification
uv run --project services/transcoder pytest -v— 20 passeduv run --project services/auth pytest -q— 11 passedgo test ./...metadata — okdocker compose --env-file .env -f deploy/docker-compose.yml up -d— pgbouncer healthy, minio-setup ilm added, postgres md5docker logs minio-setup—Lifecycle rule added raw/ 7black/flake8/mypy— passmake e2e— not run (no sample), risk lowRisks
PGBOUNCER_ENABLED=true(default false, no prod impact); fresh volume needs md5 (fixed viacommand/password_encryption)