snazy commented on code in PR #4545:
URL: https://github.com/apache/polaris/pull/4545#discussion_r3309075189
##########
persistence/nosql/persistence/metastore/src/main/java/org/apache/polaris/persistence/nosql/metastore/mutation/PolicyMutation.java:
##########
@@ -131,11 +134,22 @@ public PolicyAttachmentResult apply() {
}
}
+ var policyMapping =
PolicyMapping.builder().parameters(parameters).build();
+ var serializedPolicyMappingSize =
+ POLICY_MAPPING_SERIALIZER.serializedSize(policyMapping);
+ if (serializedPolicyMappingSize >
MAX_POLICY_MAPPING_INDEX_VALUE_SIZE) {
+ return state.noCommit(
+ new PolicyAttachmentResult(
+ UNEXPECTED_ERROR_SIGNALED,
Review Comment:
Ideally yes. I just could not find a legitimate reason why the limit would
ever be exceeded. So I think that the accompanying error message should be okay.
--
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]