github-actions[bot] commented on code in PR #61216:
URL: https://github.com/apache/doris/pull/61216#discussion_r2917663144
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/EncryptKeyName.java:
##########
@@ -75,7 +74,7 @@ public String toString() {
if (db == null) {
return keyName;
}
- return ClusterNamespace.getNameFromFullName(db) + "." + keyName;
+ return db + "." + keyName;
}
Review Comment:
**Potential issue**: Removing `ClusterNamespace.getNameFromFullName(db)` may
produce incorrect output for environments upgraded from older Doris versions.
`ConnectContext.currentDb` can still contain a cluster prefix (e.g.,
`"default_cluster:mydb"`) in certain code paths — for instance,
`MTMVPlanUtil.java:178` sets `ctx.setDatabase(databaseIf.get().getFullName())`,
where `Database.getFullName()` returns the `fullQualifiedName` which may
include the legacy cluster prefix. Similarly, encrypt keys deserialized from
old FE images may have `db` persisted with the cluster prefix.
Without the stripping call, `toString()` would produce
`"default_cluster:mydb.mykey"` instead of `"mydb.mykey"`, and `toSql()` would
produce invalid SQL like `KEY default_cluster:mydb.mykey`.
This may be intentional as part of the v3.0 cleanup (the Database class has
a comment: "ClusterNamespace.getNameFromFullName should be removed in 3.0"),
but please verify that all callers that set `db` have been migrated away from
cluster-prefixed names, or that this change is coordinated with the broader
cleanup.
--
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]