chore(search): remove unused names index client code#2702
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 20 minutes and 35 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The names index has no writers — upsert_entity_name has no callers and the defensive delete_entity_name* calls in chat/document/email removal paths cleaned up an index nothing wrote to. Dropped the orphaned upsert, all four delete variants, the OpensearchClient methods that wrapped them, and the SearchIndex::Names variant. The prod names index (3M docs, 2.5GB) can now be safely deleted out of band once this is deployed.
fbc4fe3 to
85526a1
Compare
Stacked on #2694.
Summary
namesOpenSearch index (3M docs / 2.5GB in prod) has no writers:upsert_entity_nameexists but has zero callers in the codebase. The only code still touching it is defensive cleanup in chat/document/email removal paths, which delete from an index nothing writes to.upsert_entity_name+UpsertEntityNameArgsand all fourdelete_entity_name*functions (+ theirOpensearchClientwrappers).delete_entity_name*calls fromsearch_processing_service::process::{chat, document::mod, email::remove, user}.SearchIndex::Namesvariant — with these deletions, it has no references.Once this deploys, the prod
namesindex can be deleted out of band (same pattern as the projects index).The unit test asserting
OpenSearchEntityType::index_name()matchesSearchIndex::from(variant).as_ref()(added in #2694) still passes —Nameswasn't part of that invariant.