GitHub user robocanic created a discussion: Proposal: support prefix matching and index persistence
> English version # Backgroud Admin currently supports two data storage forms: in-memory and database-backed storage. Both rely on indexes to facilitate search and query operations for upper-layer components. At present, all indexes are maintained in memory. Indexing consists of two phases: index construction and index querying. Index construction is mostly triggered after Discovery and Engine components watch data changes and write them to the database, at which point they rebuild the in-memory indexes. Index querying, on the other hand, primarily originates from frontend query requests. The current index structure is relatively simple, resembling map[idx_value][resource_key]. Different resources have different index keys, and the logical relationship used in index queries is currently limited to simple equality matches. To support prefix-based searches, the logical relationships in index queries need to be extended. Meanwhile, when Admin is deployed with multiple replicas, due to the leader-follower architecture of Discovery and Engine components, only one replica will maintain the in-memory index. Therefore, for database-backed storage, we also need to persist the indexes to ensure that, in a multi-replica deployment, frontend queries can still access the indexes effectively. # Solutions ## For memory ## For DB # Tips > 中文版本 GitHub link: https://github.com/apache/dubbo-admin/discussions/1381 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
