diff --git a/fe/fe-core/src/main/java/com/starrocks/privilege/PrivilegeCollectionV2.java b/fe/fe-core/src/main/java/com/starrocks/privilege/PrivilegeCollectionV2.java index 688b94ea4a870..2b0b05123ebf4 100644 --- a/fe/fe-core/src/main/java/com/starrocks/privilege/PrivilegeCollectionV2.java +++ b/fe/fe-core/src/main/java/com/starrocks/privilege/PrivilegeCollectionV2.java @@ -279,7 +279,9 @@ public void merge(PrivilegeCollectionV2 other) { } else { List typeList = typeToPrivilegeEntryList.get(typeId); for (PrivilegeEntry entry : otherList) { - grantObjectToList(entry.actionSet, entry.object, entry.withGrantOption, typeList); + //deep copy here + ActionSet actionSetClone = new ActionSet(entry.actionSet); + grantObjectToList(actionSetClone, entry.object, entry.withGrantOption, typeList); } // for privilege entry in other.list } } // for typeId, privilegeEntryList in other