perf(data): drop redundant user_sessions single-column indexes#655
Open
AAEE86 wants to merge 6 commits into
Open
perf(data): drop redundant user_sessions single-column indexes#655AAEE86 wants to merge 6 commits into
AAEE86 wants to merge 6 commits into
Conversation
Remove ix_user_sessions_user_id and ix_user_sessions_client_device_id on postgres; all current queries are covered by the composite indexes idx_user_sessions_user_active (user_id, revoked_at, expires_at) and idx_user_sessions_user_device (user_id, client_device_id), so the single-column indexes only add UPDATE write amplification and risk mis-planning. Sync baseline/bootstrap/driver schemas and add a migration to drop them on existing deployments.
… requests done_hub 架构在查询余额和验证流程中要求 Referer 头指向 /panel/profile, 否则请求会被拒绝。同时优化 query_balance 中的冗余 headers clone。
Add bounded runtime configuration for gateway Tokio workers so low-memory deployments can tune worker count and stack size without allowing accidental resource exhaustion. - add AETHER_GATEWAY_TOKIO_WORKER_THREADS with a 128 worker upper bound - add AETHER_GATEWAY_TOKIO_WORKER_STACK_SIZE_BYTES with 512 KiB..8 MiB bounds - add usage runtime stack size env overrides with an 8 MiB cap - keep default stack size at the existing 8 MiB baseline - make local Docker release builds use the workspace Cargo release profile - format done_hub Referer header construction Validation: - cargo fmt --all --check - git diff --check - cargo test -p aether-usage-runtime usage_background_runtime_stack_size_is_configurable -- --nocapture - cargo check -p aether-gateway --bin aether-gateway
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.
Remove ix_user_sessions_user_id and ix_user_sessions_client_device_id on postgres; all current queries are covered by the composite indexes idx_user_sessions_user_active (user_id, revoked_at, expires_at) and idx_user_sessions_user_device (user_id, client_device_id), so the single-column indexes only add UPDATE write amplification and risk mis-planning. Sync baseline/bootstrap/driver schemas and add a migration to drop them on existing deployments.