github-actions[bot] commented on code in PR #67918:
URL: https://github.com/apache/doris/pull/67918#discussion_r4004456718


##########
fe/fe-core/src/main/java/org/apache/doris/indexpolicy/IndexPolicyMgr.java:
##########
@@ -213,7 +263,8 @@ public void createIndexPolicy(boolean ifNotExists, String 
policyName,
     public IndexPolicy getPolicyByName(String name) {
         readLock();
         try {
-            return nameToIndexPolicy.get(normalizeKey(name));
+            IndexPolicy exactPolicy = 
exactNameToIndexPolicy.get(exactKey(name));

Review Comment:
   [P1] Preserve exact bindings across every name-based lifecycle path. After 
replaying legacy tokenizers id 1 `IK_SMART` (standard) and id 2 `ik_smart` 
(keyword), this method and BE construction resolve `IK_SMART` to id 1. However, 
validation and `dropIndexPolicy()` still consult only the normalized map, so 
`DROP ... IK_SMART` selects/deletes id 2; dependency scans likewise protect 
normalized colliders rather than the referenced ID. Also, merely switching 
validation to this resolver is insufficient for index-level analyzer/normalizer 
references because `AnalyzerKeyNormalizer` then lowercases the persisted 
spelling and BE executes the collider. Route selection through exact-first IDs, 
preserve a resolved exact spelling through index-property canonicalization, 
compare IDs for dependencies, and cover interactive validation/DROP plus 
emitted behavior for both colliding spellings.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to